Mercurial > octave-nkf
diff src/graphics.h.in @ 7403:135c13496faf
[project @ 2008-01-19 06:06:46 by jwe]
author | jwe |
---|---|
date | Sat, 19 Jan 2008 06:10:33 +0000 |
parents | 097a2637ef1b |
children | 32c1c3a3b07c |
line wrap: on
line diff
--- a/src/graphics.h.in Fri Jan 18 19:12:39 2008 +0000 +++ b/src/graphics.h.in Sat Jan 19 06:10:33 2008 +0000 @@ -981,7 +981,8 @@ selectionhighlight ("selectionhighlight", mh, true), uicontextmenu ("uicontextmenu", mh, graphics_handle ()), userdata ("userdata", mh, Matrix ()), - visible ("visible", mh, true) + visible ("visible", mh, true), + beingdeleted ("beingdeleted", mh, false) { } virtual ~base_properties (void) { } @@ -1054,6 +1055,9 @@ std::string get_visible (void) const { return visible.current_value (); } + bool is_beingdeleted (void) const { return beingdeleted.is_on (); } + std::string get_beingdeleted (void) const { return beingdeleted.current_value (); } + virtual void remove_child (const graphics_handle& h); virtual void adopt (const graphics_handle& h) @@ -1184,6 +1188,15 @@ } } + void set_beingdeleted (const octave_value& val) + { + if (! error_state) + { + beingdeleted = val; + mark_modified (); + } + } + void reparent (const graphics_handle& new_parent) { parent = new_parent; } @@ -1250,26 +1263,30 @@ } protected: - string_property tag; - string_property type; - bool_property __modified__; - graphics_handle __myhandle__; - handle_property parent; + // properties common to all objects + bool_property beingdeleted; + radio_property busyaction; + callback_property buttondownfcn; // FIXME: use a property class for children Matrix children; - radio_property busyaction; - callback_property buttondownfcn; bool_property clipping; callback_property createfcn; callback_property deletefcn; radio_property handlevisibility; bool_property hittest; bool_property interruptible; + handle_property parent; bool_property selected; bool_property selectionhighlight; - handle_property uicontextmenu; + string_property tag; + string_property type; any_property userdata; bool_property visible; + // additional (octave-specific) properties + bool_property __modified__; + graphics_handle __myhandle__; + // FIXME: should this really be here? + handle_property uicontextmenu; protected: std::map<caseless_str, property> all_props; @@ -1853,10 +1870,12 @@ array_property ylim m , default_lim () array_property zlim m , default_lim () array_property clim m , default_lim () + array_property alim m , default_lim () radio_property xlimmode al , "{auto}|manual" radio_property ylimmode al , "{auto}|manual" radio_property zlimmode al , "{auto}|manual" radio_property climmode al , "{auto}|manual" + radio_property alimmode , "{auto}|manual" mutable handle_property xlabel GSO , graphics_handle () mutable handle_property ylabel GSO , graphics_handle () mutable handle_property zlabel GSO , graphics_handle () @@ -1872,6 +1891,10 @@ radio_property xtickmode , "{auto}|manual" radio_property ytickmode , "{auto}|manual" radio_property ztickmode , "{auto}|manual" + bool_property xminortick , "off" + bool_property yminortick , "off" + bool_property zminortick , "off" + // FIXME: should be kind of string array any_property xticklabel m , "" any_property yticklabel m , "" any_property zticklabel m , "" @@ -1895,20 +1918,58 @@ array_property outerposition , Matrix () radio_property activepositionproperty , "{outerposition}|position" radio_property __colorbar__ h , "{none}|north|south|east|west|northoutside|southoutside|eastoutside|westoutside" + color_property ambientlightcolor , color_values (1, 1, 1) + array_property cameraposition m , Matrix (1, 3, 0.0) + array_property cameratarget m , Matrix (1, 3, 0.0) + array_property cameraupvector m , Matrix () + double_property cameraviewangle m , 10.0 + radio_property camerapositionmode , "{auto}|manual" + radio_property cameratargetmode , "{auto}|manual" + radio_property cameraupvectormode , "{auto}|manual" + radio_property cameraviewanglemode , "{auto}|manual" + array_property currentpoint , Matrix (2, 3, 0.0) + radio_property drawmode , "{normal}|fast" + radio_property fontangle , "{normal}|italic|oblique" + string_property fontname , "Helvetica" + double_property fontsize , 12 + radio_property fontunits , "{points}|normalized|inches|centimeters|pixels" + radio_property fontweight , "{normal}|light|demi|bold" + radio_property gridlinestyle , "{-}|--|:|-.|none" + // FIXME: should be kind of string array + string_property linestyleorder , "-" + double_property linewidth , 0.5 + radio_property minorgridlinestyle , "{-}|--|:|-.|none" + array_property plotboxaspectratio m , Matrix (1, 3, 1.0) + radio_property plotboxaspectratiomode , "{auto}|manual" + radio_property projection , "{orthographic}|perpective" + radio_property tickdir m , "{in}|out" + radio_property tickdirmode , "{auto}|manual" + array_property ticklength , Matrix (1, 2, 0.1) + array_property tightinset r , Matrix (1, 4, 0.0) + // FIXME: uicontextmenu should be moved here + radio_property units , "{normalized}|inches|centimeters|points|pixels|characters" + // hidden properties for transformation computation + array_property x_viewtransform h , Matrix (4, 4, 0.0) + array_property x_projectiontransform h , Matrix (4, 4, 0.0) + array_property x_viewporttransform h , Matrix (4, 4, 0.0) + array_property x_normrendertransform h , Matrix (4, 4, 0.0) + array_property x_rendertransform h , Matrix (4, 4, 0.0) END_PROPERTIES protected: void init (void) { position.add_constraint (dim_vector (1, 4)); - position.add_constraint (dim_vector (0, 0)); + position.add_constraint (dim_vector (0, 0)); outerposition.add_constraint (dim_vector (1, 4)); colororder.add_constraint (dim_vector (-1, 3)); dataaspectratio.add_constraint (dim_vector (1, 3)); + plotboxaspectratio.add_constraint (dim_vector (1, 3)); xlim.add_constraint (dim_vector (1, 2)); ylim.add_constraint (dim_vector (1, 2)); zlim.add_constraint (dim_vector (1, 2)); clim.add_constraint (dim_vector (1, 2)); + alim.add_constraint (dim_vector (1, 2)); xtick.add_constraint (dim_vector (1, -1)); ytick.add_constraint (dim_vector (1, -1)); ztick.add_constraint (dim_vector (1, -1)); @@ -1916,6 +1977,14 @@ vw(1) = 90; view = vw; view.add_constraint (dim_vector (1, 2)); + cameraposition.add_constraint (dim_vector (1, 3)); + Matrix upv (1, 3, 0.0); + upv(2) = 1.0; + cameraupvector = upv; + cameraupvector.add_constraint (dim_vector (1, 3)); + currentpoint.add_constraint (dim_vector (2, 3)); + ticklength.add_constraint (dim_vector (1, 2)); + tightinset.add_constraint (dim_vector (1, 4)); } }; @@ -2163,7 +2232,7 @@ // properties declarations. BEGIN_PROPERTIES(patch) - data_property xdata l , Matrix () + data_property xdata l , Matrix () data_property ydata l , Matrix () data_property zdata l , Matrix () data_property cdata l , Matrix ()