Mercurial > octave
comparison src/graphics.h.in @ 11155:f0e9befd6a1c
add uimenu graphic object to fltk backend
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Mon, 25 Oct 2010 11:26:43 +0200 |
parents | d761f0dc997e |
children | a981e2f56ec1 |
comparison
equal
deleted
inserted
replaced
11154:92a7c136ab35 | 11155:f0e9befd6a1c |
---|---|
3853 void update_axis_limits (const std::string& axis_type); | 3853 void update_axis_limits (const std::string& axis_type); |
3854 }; | 3854 }; |
3855 | 3855 |
3856 // --------------------------------------------------------------------- | 3856 // --------------------------------------------------------------------- |
3857 | 3857 |
3858 class OCTINTERP_API uimenu : public base_graphics_object | |
3859 { | |
3860 public: | |
3861 class OCTINTERP_API properties : public base_properties | |
3862 { | |
3863 public: | |
3864 void remove_child (const graphics_handle& h) | |
3865 { | |
3866 base_properties::remove_child (h); | |
3867 } | |
3868 | |
3869 void adopt (const graphics_handle& h) | |
3870 { | |
3871 base_properties::adopt (h); | |
3872 } | |
3873 | |
3874 // See the genprops.awk script for an explanation of the | |
3875 // properties declarations. | |
3876 | |
3877 BEGIN_PROPERTIES (uimenu) | |
3878 string_property accelerator , "" | |
3879 callback_property callback , Matrix() | |
3880 bool_property checked , "off" | |
3881 bool_property enable , "on" | |
3882 color_property foregroundcolor , color_values (0, 0, 0) | |
3883 string_property label , "" | |
3884 double_property position , 9 | |
3885 bool_property separator , "off" | |
3886 string_property fltk_label h , "" | |
3887 END_PROPERTIES | |
3888 | |
3889 protected: | |
3890 void init (void) | |
3891 { } | |
3892 }; | |
3893 | |
3894 private: | |
3895 properties xproperties; | |
3896 | |
3897 public: | |
3898 uimenu (const graphics_handle& mh, const graphics_handle& p) | |
3899 : base_graphics_object (), xproperties (mh, p) | |
3900 { | |
3901 xproperties.override_defaults (*this); | |
3902 } | |
3903 | |
3904 ~uimenu (void) { xproperties.delete_children (); } | |
3905 | |
3906 base_properties& get_properties (void) { return xproperties; } | |
3907 | |
3908 const base_properties& get_properties (void) const { return xproperties; } | |
3909 | |
3910 bool valid_object (void) const { return true; } | |
3911 | |
3912 }; | |
3913 | |
3914 // --------------------------------------------------------------------- | |
3915 | |
3858 octave_value | 3916 octave_value |
3859 get_property_from_handle (double handle, const std::string &property, | 3917 get_property_from_handle (double handle, const std::string &property, |
3860 const std::string &func); | 3918 const std::string &func); |
3861 bool | 3919 bool |
3862 set_property_in_handle (double handle, const std::string &property, | 3920 set_property_in_handle (double handle, const std::string &property, |