octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HOWTO add a new graphics property


From: Shai Ayal
Subject: HOWTO add a new graphics property
Date: Sun, 17 Jun 2007 06:41:48 +0300

Hi all,

I wrote this up just to have some simple guide with all the necessary
steps on how to add a new graphics property. Please have a look and
correct it if necessary. Hopefully when finalized this howto will
enable more people to contribute code.

Shai

how to add property pppp of type tttt to axes:
all functions mentioned below are in src/graphics.cc and src/graphics.h

in axes_properties class definition, add:
OCTAVE_GRAPHICS_PROPERTY (tttt, pppp);

axes::axes_properties::axes_properties
add code to initialize

axes::axes_properties::set
add code to set ppp from an octave_value

axes::axes_properties::set_defaults
add code to set the default value

axes::axes_properties::get (void) const
add code to return as a cell

axes::axes_properties::get (const property_name& name) const
add code to return as an octave_value

property_list::pval_map_type axes::axes_properties::factory_defaults
add the factory default vlaue for pppp

if the property is a child object, also modify

void axes::axes_properties::delete_children
void axes::axes_properties::remove_child


reply via email to

[Prev in Thread] Current Thread [Next in Thread]