HOWTO add a new graphics property
Shai Ayal shaiay at gmail.comSat Jun 16 22:41:48 CDT 2007
- Previous message: Why is NaN used as extrapolation value?
- Next message: HOWTO add a new graphics property
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
Also, I noticed this last month and a littler earlier to that, many new projects on Octave, including
- Qt-Octave, developed by from Spain
- Octave-XML, developed by Thomas Geiger, from Austria?.
John Swensen explains how he runs Octave interpreter with the Octave GUI properly. I wonder if writing an evaluating parse tree is a solution.
Nice to see the ideas flowing, and what makes Octave the really the diverse community on a shared platform it is. Being, Indian, I can appreciate the micro-worlds in macro-world.
Cheers,
Muthu
No comments:
Post a Comment