comparison src/graphics.h.in @ 13713:d99aa455296e

Add outerposition property to figure objects. * graphics.h.in (figure::properties::outerposition): New property. (figure::properties::position): Make with 's' flag. (figure::properties::set_position): Explicit definition with additional input argument for toolkit notification. (figure::properties::set_outerposition): New method. (figure::properties::set_boundingbox): New arguments for inner/outer bounding box and toolkit notification. (figure::properties::init): Add constraint for outerposition. * graphics.cc (figure::properties::get_boundingbox): Returns position or outerposition, depending on internal flag. (figure::properties::set_boundingbox): New input arguments for inner/outer position and toolkit notification. (figure::properties::set_position): New input argument for toolkit noticiation. (figure::properties::set_outerposition): New method.
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 17 Oct 2011 21:46:02 +0100
parents 22ce748da25f
children a2f8ca655ca3
comparison
equal deleted inserted replaced
13712:f80473f24553 13713:d99aa455296e
3093 else 3093 else
3094 error ("set___graphics_toolkit__ must be a string"); 3094 error ("set___graphics_toolkit__ must be a string");
3095 } 3095 }
3096 } 3096 }
3097 3097
3098 void set_position (const octave_value& val,
3099 bool do_notify_toolkit = true);
3100
3101 void set_outerposition (const octave_value& val,
3102 bool do_notify_toolkit = true);
3103
3098 Matrix get_boundingbox (bool internal = false, 3104 Matrix get_boundingbox (bool internal = false,
3099 const Matrix& parent_pix_size = Matrix ()) const; 3105 const Matrix& parent_pix_size = Matrix ()) const;
3100 3106
3101 void set_boundingbox (const Matrix& bb); 3107 void set_boundingbox (const Matrix& bb, bool internal = false,
3108 bool do_notify_toolkit = true);
3102 3109
3103 Matrix map_from_boundingbox (double x, double y) const; 3110 Matrix map_from_boundingbox (double x, double y) const;
3104 3111
3105 Matrix map_to_boundingbox (double x, double y) const; 3112 Matrix map_to_boundingbox (double x, double y) const;
3106 3113
3135 callback_property keyreleasefcn , Matrix () 3142 callback_property keyreleasefcn , Matrix ()
3136 radio_property menubar , "none|{figure}" 3143 radio_property menubar , "none|{figure}"
3137 double_property mincolormap , 64 3144 double_property mincolormap , 64
3138 string_property name , "" 3145 string_property name , ""
3139 bool_property numbertitle , "on" 3146 bool_property numbertitle , "on"
3147 array_property outerposition s , Matrix (1, 4, -1.0)
3140 radio_property paperunits Su , "{inches}|centimeters|normalized|points" 3148 radio_property paperunits Su , "{inches}|centimeters|normalized|points"
3141 array_property paperposition , default_figure_paperposition () 3149 array_property paperposition , default_figure_paperposition ()
3142 radio_property paperpositionmode , "auto|{manual}" 3150 radio_property paperpositionmode , "auto|{manual}"
3143 array_property papersize U , default_figure_papersize () 3151 array_property papersize U , default_figure_papersize ()
3144 radio_property papertype SU , "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>" 3152 radio_property papertype SU , "{usletter}|uslegal|a0|a1|a2|a3|a4|a5|b0|b1|b2|b3|b4|b5|arch-a|arch-b|arch-c|arch-d|arch-e|a|b|c|d|e|tabloid|<custom>"
3145 radio_property pointer , "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand" 3153 radio_property pointer , "crosshair|fullcrosshair|{arrow}|ibeam|watch|topl|topr|botl|botr|left|top|right|bottom|circle|cross|fleur|custom|hand"
3146 array_property pointershapecdata , Matrix (16, 16, 0) 3154 array_property pointershapecdata , Matrix (16, 16, 0)
3147 array_property pointershapehotspot , Matrix (1, 2, 0) 3155 array_property pointershapehotspot , Matrix (1, 2, 0)
3148 array_property position S , default_figure_position () 3156 array_property position s , default_figure_position ()
3149 radio_property renderer , "{painters}|zbuffer|opengl|none" 3157 radio_property renderer , "{painters}|zbuffer|opengl|none"
3150 radio_property renderermode , "{auto}|manual" 3158 radio_property renderermode , "{auto}|manual"
3151 bool_property resize , "on" 3159 bool_property resize , "on"
3152 callback_property resizefcn , Matrix () 3160 callback_property resizefcn , Matrix ()
3153 radio_property selectiontype , "{normal}|open|alt|extend" 3161 radio_property selectiontype , "{normal}|open|alt|extend"
3175 alphamap.add_constraint (dim_vector (-1, 1)); 3183 alphamap.add_constraint (dim_vector (-1, 1));
3176 paperposition.add_constraint (dim_vector (1, 4)); 3184 paperposition.add_constraint (dim_vector (1, 4));
3177 pointershapecdata.add_constraint (dim_vector (16, 16)); 3185 pointershapecdata.add_constraint (dim_vector (16, 16));
3178 pointershapehotspot.add_constraint (dim_vector (1, 2)); 3186 pointershapehotspot.add_constraint (dim_vector (1, 2));
3179 position.add_constraint (dim_vector (1, 4)); 3187 position.add_constraint (dim_vector (1, 4));
3188 outerposition.add_constraint (dim_vector (1, 4));
3180 } 3189 }
3181 3190
3182 private: 3191 private:
3183 mutable graphics_toolkit toolkit; 3192 mutable graphics_toolkit toolkit;
3184 }; 3193 };