comparison src/graphics.h.in @ 10722:755fcb5baad3

Add the reset built function
author David Bateman <dbateman@free.fr>
date Wed, 23 Jun 2010 11:23:32 +0200
parents 9d4a198614ab
children f0236b444356
comparison
equal deleted inserted replaced
10720:998d7ba68009 10722:755fcb5baad3
2221 get_properties ().delete_listener (nm, v, mode); 2221 get_properties ().delete_listener (nm, v, mode);
2222 } 2222 }
2223 2223
2224 virtual void remove_all_listeners (void); 2224 virtual void remove_all_listeners (void);
2225 2225
2226 virtual void reset_default_properties (void)
2227 {
2228 if (valid_object ())
2229 {
2230 std::string msg = (type () + "::reset_default_properties");
2231 gripe_not_implemented (msg.c_str ());
2232 }
2233 else
2234 error ("base_graphics_object::default: invalid graphics object");
2235 }
2236
2226 protected: 2237 protected:
2227 // A reference count. 2238 // A reference count.
2228 int count; 2239 int count;
2229 }; 2240 };
2230 2241
2406 { rep->add_property_listener (nm, v, mode); } 2417 { rep->add_property_listener (nm, v, mode); }
2407 2418
2408 void delete_property_listener (const std::string& nm, const octave_value& v, 2419 void delete_property_listener (const std::string& nm, const octave_value& v,
2409 listener_mode mode = POSTSET) 2420 listener_mode mode = POSTSET)
2410 { rep->delete_property_listener (nm, v, mode); } 2421 { rep->delete_property_listener (nm, v, mode); }
2422
2423 void reset_default_properties (void)
2424 { rep->reset_default_properties (); }
2411 2425
2412 private: 2426 private:
2413 base_graphics_object *rep; 2427 base_graphics_object *rep;
2414 }; 2428 };
2415 2429
2545 base_properties& get_properties (void) { return xproperties; } 2559 base_properties& get_properties (void) { return xproperties; }
2546 2560
2547 const base_properties& get_properties (void) const { return xproperties; } 2561 const base_properties& get_properties (void) const { return xproperties; }
2548 2562
2549 bool valid_object (void) const { return true; } 2563 bool valid_object (void) const { return true; }
2564
2565 void reset_default_properties (void);
2550 2566
2551 private: 2567 private:
2552 property_list default_properties; 2568 property_list default_properties;
2553 2569
2554 static property_list factory_properties; 2570 static property_list factory_properties;
2749 base_properties& get_properties (void) { return xproperties; } 2765 base_properties& get_properties (void) { return xproperties; }
2750 2766
2751 const base_properties& get_properties (void) const { return xproperties; } 2767 const base_properties& get_properties (void) const { return xproperties; }
2752 2768
2753 bool valid_object (void) const { return true; } 2769 bool valid_object (void) const { return true; }
2770
2771 void reset_default_properties (void);
2754 2772
2755 private: 2773 private:
2756 property_list default_properties; 2774 property_list default_properties;
2757 }; 2775 };
2758 2776
3197 3215
3198 void update_axis_limits (const std::string& axis_type); 3216 void update_axis_limits (const std::string& axis_type);
3199 3217
3200 bool valid_object (void) const { return true; } 3218 bool valid_object (void) const { return true; }
3201 3219
3220 void reset_default_properties (void);
3221
3202 private: 3222 private:
3203 property_list default_properties; 3223 property_list default_properties;
3204 }; 3224 };
3205 3225
3206 // --------------------------------------------------------------------- 3226 // ---------------------------------------------------------------------