tasn pushed a commit to branch master. http://git.enlightenment.org/bindings/cxx/eflxx.git/commit/?id=723eb72803bddc2fc0c0f3fc07f8814ebea693cc
commit 723eb72803bddc2fc0c0f3fc07f8814ebea693cc Author: Andreas Volz <li...@brachttal.net> Date: Sun Nov 25 21:35:42 2012 +0000 - add virtual destructor - move contructor and destructor from private to protected to allow child classes in applications SVN revision: 79660 --- elementaryxx/include/elementaryxx/Background.h | 8 +++- elementaryxx/include/elementaryxx/Box.h | 16 ++++---- elementaryxx/include/elementaryxx/Bubble.h | 7 +++- elementaryxx/include/elementaryxx/Button.h | 7 +++- elementaryxx/include/elementaryxx/Check.h | 7 +++- elementaryxx/include/elementaryxx/Clock.h | 6 ++- elementaryxx/include/elementaryxx/Entry.h | 12 +++--- elementaryxx/include/elementaryxx/Frame.h | 7 +++- elementaryxx/include/elementaryxx/Gen.h | 17 +++++---- elementaryxx/include/elementaryxx/Hover.h | 7 +++- elementaryxx/include/elementaryxx/Icon.h | 51 +++++++++++++++++++++++-- elementaryxx/include/elementaryxx/Image.h | 6 ++- elementaryxx/include/elementaryxx/Label.h | 8 +++- elementaryxx/include/elementaryxx/Layout.h | 8 ++-- elementaryxx/include/elementaryxx/List.h | 7 +++- elementaryxx/include/elementaryxx/Object.h | 10 ++--- elementaryxx/include/elementaryxx/Panel.h | 14 ++++--- elementaryxx/include/elementaryxx/Progressbar.h | 7 +++- elementaryxx/include/elementaryxx/Radio.h | 7 +++- elementaryxx/include/elementaryxx/Scroller.h | 7 +++- elementaryxx/include/elementaryxx/Separator.h | 7 +++- elementaryxx/include/elementaryxx/Slider.h | 7 +++- elementaryxx/include/elementaryxx/Spinner.h | 7 +++- elementaryxx/include/elementaryxx/Table.h | 7 +++- elementaryxx/include/elementaryxx/Window.h | 26 +++++-------- elementaryxx/src/Icon.cpp | 12 ++++++ 26 files changed, 197 insertions(+), 88 deletions(-) diff --git a/elementaryxx/include/elementaryxx/Background.h b/elementaryxx/include/elementaryxx/Background.h index 1f72f08..5aa36ed 100644 --- a/elementaryxx/include/elementaryxx/Background.h +++ b/elementaryxx/include/elementaryxx/Background.h @@ -115,12 +115,16 @@ EAPI void elm_bg_file_get(const Evas_Object *obj, const * @ingroup Background */ void setLoadSize (Eflxx::Size s); + +protected: + // allow only construction for child classes + Background (Evasxx::Object &parent); // private construction -> use factory () + + virtual ~Background (); // forbid direct delete -> use Object::destroy() private: Background (); // forbid standard constructor Background (const Background&); // forbid copy constructor - Background (Evasxx::Object &parent); // private construction -> use factory () - ~Background (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Box.h b/elementaryxx/include/elementaryxx/Box.h index feeffb2..5b2a083 100644 --- a/elementaryxx/include/elementaryxx/Box.h +++ b/elementaryxx/include/elementaryxx/Box.h @@ -17,13 +17,6 @@ class Box : public Object public: static Box *factory (Evasxx::Object &parent); -private: - Box (); // forbid standard constructor - Box (const Box&); // forbid copy constructor - Box (Evasxx::Object &parent); // private construction -> use factory () - ~Box (); // forbid direct delete -> use Object::destroy() - -public: enum Orientation { Horizontal, @@ -41,6 +34,15 @@ public: void packBefore (const Evasxx::Object &subobj, const Evasxx::Object &before); void packAfter (const Evasxx::Object &subobj, const Evasxx::Object &after); + +protected: + // allow only construction for child classes + Box (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Box (); // forbid direct delete -> use Object::destroy() + +private: + Box (); // forbid standard constructor + Box (const Box&); // forbid copy constructor }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Bubble.h b/elementaryxx/include/elementaryxx/Bubble.h index 917dea7..4787c97 100644 --- a/elementaryxx/include/elementaryxx/Bubble.h +++ b/elementaryxx/include/elementaryxx/Bubble.h @@ -18,12 +18,15 @@ public: static Bubble *factory (Evasxx::Object &parent); void setCorner (const std::string &corner); + +protected: + // allow only construction for child classes + Bubble (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Bubble (); // forbid direct delete -> use Object::destroy() private: Bubble (); // forbid standard constructor Bubble (const Bubble&); // forbid copy constructor - Bubble (Evasxx::Object &parent); // private construction -> use factory () - ~Bubble (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Button.h b/elementaryxx/include/elementaryxx/Button.h index f2141ff..8b28706 100644 --- a/elementaryxx/include/elementaryxx/Button.h +++ b/elementaryxx/include/elementaryxx/Button.h @@ -25,12 +25,15 @@ class Button : public Object { public: static Button *factory (Evasxx::Object &parent); + +protected: + // allow only construction for child classes + Button (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Button (); // forbid direct delete -> use Object::destroy() private: Button (); // forbid standard constructor Button (const Button&); // forbid copy constructor - Button (Evasxx::Object &parent); // private construction -> use factory () - ~Button (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Check.h b/elementaryxx/include/elementaryxx/Check.h index e36f255..70d043a 100644 --- a/elementaryxx/include/elementaryxx/Check.h +++ b/elementaryxx/include/elementaryxx/Check.h @@ -24,12 +24,15 @@ public: void setState (bool state); bool getState () const; + +protected: + // allow only construction for child classes + Check (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Check (); // forbid direct delete -> use Object::destroy() private: Check (); // forbid standard constructor Check (const Check&); // forbid copy constructor - Check (Evasxx::Object &parent); // private construction -> use factory () - ~Check (); // forbid direct delete -> use Object::destroy() }; #if 0 diff --git a/elementaryxx/include/elementaryxx/Clock.h b/elementaryxx/include/elementaryxx/Clock.h index 9994b1f..dc2ce65 100644 --- a/elementaryxx/include/elementaryxx/Clock.h +++ b/elementaryxx/include/elementaryxx/Clock.h @@ -44,12 +44,14 @@ public: void setShowAmPm (bool am_pm); void setShowSeconds (bool seconds); + +protected: + Clock (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Clock (); // forbid direct delete -> use Object::destroy() private: Clock (); // forbid standard constructor Clock (const Clock&); // forbid copy constructor - Clock (Evasxx::Object &parent); // private construction -> use factory () - ~Clock (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Entry.h b/elementaryxx/include/elementaryxx/Entry.h index 5e163fe..e75d235 100644 --- a/elementaryxx/include/elementaryxx/Entry.h +++ b/elementaryxx/include/elementaryxx/Entry.h @@ -235,7 +235,6 @@ public: * @ingroup Entry */ void appendText (const std::string &entry); - EAPI void elm_entry_entry_append(Evas_Object *obj, const char *entry); /** * Set the line wrap type to use on multi-line entries. @@ -565,12 +564,15 @@ public: * @ingroup Entry */ void endAnchorHover(); + +protected: + // allow only construction for child classes + Entry (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Entry (); // forbid direct delete -> use Object::destroy() private: Entry (); // forbid standard constructor Entry (const Entry&); // forbid copy constructor - Entry (Evasxx::Object &parent); // private construction -> use factory () - ~Entry (); // forbid direct delete -> use Object::destroy() }; #if 0 @@ -993,7 +995,7 @@ EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, EAPI Eina_Bool elm_entry_input_panel_enabled_get(const Evas_Object *obj); /** - * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on. + * Show the input panel (keyboard) based on the input panel property of entry such as layout, autocapital types, and so on. * * Note that input panel is shown or hidden automatically according to the focus state of entry widget. * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE). @@ -1005,7 +1007,7 @@ EAPI Eina_Bool elm_entry_input_panel_enabled_get(const Evas_Object EAPI void elm_entry_input_panel_show(Evas_Object *obj); /** - * Hide the input panel (virtual keyboard). + * Hide the input panel (keyboard). * * Note that input panel is shown or hidden automatically according to the focus state of entry widget. * This API can be used in the case of manually controlling by using elm_entry_input_panel_enabled_set(en, EINA_FALSE) diff --git a/elementaryxx/include/elementaryxx/Frame.h b/elementaryxx/include/elementaryxx/Frame.h index 9210ceb..965615e 100644 --- a/elementaryxx/include/elementaryxx/Frame.h +++ b/elementaryxx/include/elementaryxx/Frame.h @@ -30,12 +30,15 @@ public: void setLabel (const std::string &label); void setContent (const Evasxx::Object &content); + +protected: + // allow only construction for child classes + Frame (Evasxx::Object &parent); // private construction -> use factory () + ~Frame (); // forbid direct delete -> use Object::destroy() private: Frame (); // forbid standard constructor Frame (const Frame&); // forbid copy constructor - Frame (Evasxx::Object &parent); // private construction -> use factory () - ~Frame (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Gen.h b/elementaryxx/include/elementaryxx/Gen.h index 4877c54..a7ff613 100644 --- a/elementaryxx/include/elementaryxx/Gen.h +++ b/elementaryxx/include/elementaryxx/Gen.h @@ -15,23 +15,24 @@ namespace Elmxx { class Gen : public Object { public: - virtual void clear (); + void clear (); - virtual void setAlwaysSelectMode (bool alwaysSelect); + void setAlwaysSelectMode (bool alwaysSelect); - virtual bool getAlwaysSelectMode (); + bool getAlwaysSelectMode (); - virtual void setNoSelectMode (bool noSelect); + void setNoSelectMode (bool noSelect); - virtual bool getNoSelectMode (); + bool getNoSelectMode (); - virtual void setBounce (bool hBounce, bool vBounce); + void setBounce (bool hBounce, bool vBounce); - virtual void getBounce (bool &hBounceOut, bool &vBounceOut); + void getBounce (bool &hBounceOut, bool &vBounceOut); protected: + // allow only construction for child classes Gen (); // allow only construction for child classes - ~Gen (); // forbid direct delete -> use Object::destroy() + virtual ~Gen (); // forbid direct delete -> use Object::destroy() private: Gen (const Gen&); // forbid copy constructor diff --git a/elementaryxx/include/elementaryxx/Hover.h b/elementaryxx/include/elementaryxx/Hover.h index 61b8da4..5195ac4 100644 --- a/elementaryxx/include/elementaryxx/Hover.h +++ b/elementaryxx/include/elementaryxx/Hover.h @@ -28,11 +28,14 @@ public: const string getBestContentLocation (Elm_Hover_Axis prefAxis) const; +protected: + // allow only construction for child classes + Hover (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Hover (); // forbid direct delete -> use Object::destroy() + private: Hover (); // forbid standard constructor Hover (const Hover&); // forbid copy constructor - Hover (Evasxx::Object &parent); // private construction -> use factory () - ~Hover (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Icon.h b/elementaryxx/include/elementaryxx/Icon.h index 7496242..0b7f25c 100644 --- a/elementaryxx/include/elementaryxx/Icon.h +++ b/elementaryxx/include/elementaryxx/Icon.h @@ -24,8 +24,50 @@ public: bool setFile (const std::string &file); bool setFile (const std::string &file, const std::string &group); - + + /** + * Set the icon by icon standards names. + * + * @param obj The icon object + * @param name The icon name + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * For example, freedesktop.org defines standard icon names such as "home", + * "network", etc. There can be different icon sets to match those icon + * keys. The @p name given as parameter is one of these "keys", and will be + * used to look in the freedesktop.org paths and elementary theme. One can + * change the lookup order with elm_icon_order_lookup_set(). + * + * If name is not found in any of the expected locations and it is the + * absolute path of an image file, this image will be used. + * + * @note The icon image set by this function can be changed by + * elm_image_file_set(). + * + * @see getStandard() + * @see setFile() + * + * @ingroup Icon + */ void setStandard (const std::string &name); + + /** + * Get the icon name set by icon standard names. + * + * @param obj The icon object + * @return The icon name + * + * If the icon image was set using setFile() instead of + * setStandard(), then this function will return @c NULL. + * + * @see setStandard() + * + * @ingroup Icon + */ + //std::string getStandard(); + + void setSmooth (bool smooth); @@ -37,11 +79,14 @@ public: void setPrescale (int size); +protected: + // allow only construction for child classes + Icon (Evasxx::Object &parent); // private construction -> use factory () + ~Icon (); // forbid direct delete -> use Object::destroy() + private: Icon (); // forbid standard constructor Icon (const Icon&); // forbid copy constructor - Icon (Evasxx::Object &parent); // private construction -> use factory () - ~Icon (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Image.h b/elementaryxx/include/elementaryxx/Image.h index 069a23c..b06fd05 100644 --- a/elementaryxx/include/elementaryxx/Image.h +++ b/elementaryxx/include/elementaryxx/Image.h @@ -35,11 +35,13 @@ public: void setOrient (Elm_Image_Orient orient); +protected: + Image (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Image (); // forbid direct delete -> use Object::destroy() + private: Image (); // forbid standard constructor Image (const Image&); // forbid copy constructor - Image (Evasxx::Object &parent); // private construction -> use factory () - ~Image (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Label.h b/elementaryxx/include/elementaryxx/Label.h index 705e976..b775da2 100644 --- a/elementaryxx/include/elementaryxx/Label.h +++ b/elementaryxx/include/elementaryxx/Label.h @@ -24,12 +24,16 @@ public: void setWrapWidth (Evas_Coord w); Evas_Coord getWrapWidth () const; + +protected: + // allow only construction for child classes + Label (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Label (); // forbid direct delete -> use Object::destroy() private: Label (); // forbid standard constructor Label (const Label&); // forbid copy constructor - Label (Evasxx::Object &parent); // private construction -> use factory () - ~Label (); // forbid direct delete -> use Object::destroy() + }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Layout.h b/elementaryxx/include/elementaryxx/Layout.h index 9402665..d5f474f 100644 --- a/elementaryxx/include/elementaryxx/Layout.h +++ b/elementaryxx/include/elementaryxx/Layout.h @@ -22,13 +22,15 @@ public: void setContent (const std::string &swallow, const Evasxx::Object &content); Eflxx::CountedPtr <Edjexx::Object> getEdje (); - +protected: + // allow only construction for child classes + Layout (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Layout (); // forbid direct delete -> use Object::destroy() + private: Layout (); // forbid standard constructor Layout (const Layout&); // forbid copy constructor - Layout (Evasxx::Object &parent); // private construction -> use factory () - ~Layout (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/List.h b/elementaryxx/include/elementaryxx/List.h index 5238dea..290234f 100644 --- a/elementaryxx/include/elementaryxx/List.h +++ b/elementaryxx/include/elementaryxx/List.h @@ -43,11 +43,14 @@ public: Elm_Object_Item *append (const std::string &label, const Evasxx::Object &icon, const Evasxx::Object &end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data); +protected: + // allow only construction for child classes + List (Evasxx::Object &parent); // private construction -> use factory () + virtual ~List (); // forbid direct delete -> use Object::destroy() + private: List (); // forbid standard constructor List (const List&); // forbid copy constructor - List (Evasxx::Object &parent); // private construction -> use factory () - ~List (); // forbid direct delete -> use Object::destroy() }; #if 0 diff --git a/elementaryxx/include/elementaryxx/Object.h b/elementaryxx/include/elementaryxx/Object.h index 5009c30..0b4f9b6 100644 --- a/elementaryxx/include/elementaryxx/Object.h +++ b/elementaryxx/include/elementaryxx/Object.h @@ -25,7 +25,7 @@ public: void setDisabled (bool disabled); bool getDisabled (); - virtual void focus (); + void focus (); /*! * Check if the given Evas Object is an Elementary widget. @@ -169,7 +169,7 @@ public: * * @ingroup General */ - Eflxx::CountedPtr <Evasxx::Object> findName(const std::string &name, int recurse); + virtual Eflxx::CountedPtr <Evasxx::Object> findName(const std::string &name, int recurse); /** * Set the text to read out when in accessibility mode @@ -179,16 +179,16 @@ public: * * @ingroup General */ - void setInfoAccess(const std::string &txt); + virtual void setInfoAccess(const std::string &txt); - void destroy (); + virtual void destroy (); protected: Object (); // allow only construction for child classes virtual ~Object (); // forbid direct delete -> use destroy() - void elmInit (); + virtual void elmInit (); private: Object (const Object&); // forbid copy constructor diff --git a/elementaryxx/include/elementaryxx/Panel.h b/elementaryxx/include/elementaryxx/Panel.h index fcab1e2..9583709 100644 --- a/elementaryxx/include/elementaryxx/Panel.h +++ b/elementaryxx/include/elementaryxx/Panel.h @@ -14,15 +14,17 @@ class Panel : public Object public: static Panel *factory (Evasxx::Object &parent); + void setOrientation (Elm_Panel_Orient orient); + void setContent (Evasxx::Object &content); + +protected: + // allow only construction for child classes + Panel (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Panel (); // forbid direct delete -> use ElmWidget::destroy() + private: Panel (); // forbid standard constructor Panel (const Panel&); // forbid copy constructor - Panel (Evasxx::Object &parent); // private construction -> use factory () - ~Panel (); // forbid direct delete -> use ElmWidget::destroy() - -public: - void setOrientation (Elm_Panel_Orient orient); - void setContent (Evasxx::Object &content); }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Progressbar.h b/elementaryxx/include/elementaryxx/Progressbar.h index c2f7fd7..cc41fb2 100644 --- a/elementaryxx/include/elementaryxx/Progressbar.h +++ b/elementaryxx/include/elementaryxx/Progressbar.h @@ -56,12 +56,15 @@ public: void setValue (double val); double getValue (); + +protected: + // allow only construction for child classes + Progressbar (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Progressbar (); // forbid direct delete -> use ElmWidget::destroy() private: Progressbar (); // forbid standard constructor Progressbar (const Progressbar&); // forbid copy constructor - Progressbar (Evasxx::Object &parent); // private construction -> use factory () - ~Progressbar (); // forbid direct delete -> use ElmWidget::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Radio.h b/elementaryxx/include/elementaryxx/Radio.h index c66ece2..ef61835 100644 --- a/elementaryxx/include/elementaryxx/Radio.h +++ b/elementaryxx/include/elementaryxx/Radio.h @@ -28,12 +28,15 @@ public: void setValue (int value); int getValue () const; + +protected: + // allow only construction for child classes + Radio (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Radio (); // forbid direct delete -> use Object::destroy() private: Radio (); // forbid standard constructor Radio (const Radio&); // forbid copy constructor - Radio (Evasxx::Object &parent); // private construction -> use factory () - ~Radio (); // forbid direct delete -> use Object::destroy() }; #if 0 diff --git a/elementaryxx/include/elementaryxx/Scroller.h b/elementaryxx/include/elementaryxx/Scroller.h index 0b573b8..729e383 100644 --- a/elementaryxx/include/elementaryxx/Scroller.h +++ b/elementaryxx/include/elementaryxx/Scroller.h @@ -38,12 +38,15 @@ public: const Eflxx::Size getChildSize () const; void setBounce (bool hBounce, bool vBounce); // TODO: is H=height and V=vertical? + +protected: + // allow only construction for child classes + Scroller (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Scroller (); // forbid direct delete -> use Object::destroy() private: Scroller (); // forbid standard constructor Scroller (const Scroller&); // forbid copy constructor - Scroller (Evasxx::Object &parent); // private construction -> use factory () - ~Scroller (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Separator.h b/elementaryxx/include/elementaryxx/Separator.h index 648d1ea..d278cf5 100644 --- a/elementaryxx/include/elementaryxx/Separator.h +++ b/elementaryxx/include/elementaryxx/Separator.h @@ -25,12 +25,15 @@ public: void setOrientation (Separator::Orientation orient); Separator::Orientation getOrientation (); + +protected: + // allow only construction for child classes + Separator (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Separator (); // forbid direct delete -> use ElmWidget::destroy() private: Separator (); // forbid standard constructor Separator (const Separator&); // forbid copy constructor - Separator (Evasxx::Object &parent); // private construction -> use factory () - ~Separator (); // forbid direct delete -> use ElmWidget::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Slider.h b/elementaryxx/include/elementaryxx/Slider.h index 711d33a..257ff1b 100644 --- a/elementaryxx/include/elementaryxx/Slider.h +++ b/elementaryxx/include/elementaryxx/Slider.h @@ -46,11 +46,14 @@ public: void setInverted (bool inverted); +protected: + // allow only construction for child classes + Slider (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Slider (); // forbid direct delete -> use Object::destroy() + private: Slider (); // forbid standard constructor Slider (const Slider&); // forbid copy constructor - Slider (Evasxx::Object &parent); // private construction -> use factory () - ~Slider (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Spinner.h b/elementaryxx/include/elementaryxx/Spinner.h index 1c52cf8..a82003b 100644 --- a/elementaryxx/include/elementaryxx/Spinner.h +++ b/elementaryxx/include/elementaryxx/Spinner.h @@ -26,12 +26,15 @@ public: void setValue (double val); double getValue (); void setWrap (bool wrap); + +protected: + // allow only construction for child classes + Spinner (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Spinner (); // forbid direct delete -> use ElmWidget::destroy() private: Spinner (); // forbid standard constructor Spinner (const Spinner&); // forbid copy constructor - Spinner (Evasxx::Object &parent); // private construction -> use factory () - ~Spinner (); // forbid direct delete -> use ElmWidget::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Table.h b/elementaryxx/include/elementaryxx/Table.h index d7878ac..ce90a79 100644 --- a/elementaryxx/include/elementaryxx/Table.h +++ b/elementaryxx/include/elementaryxx/Table.h @@ -20,11 +20,14 @@ public: void pack (const Evasxx::Object &subobj, const Eflxx::Rect &rect); +protected: + // allow only construction for child classes + Table (Evasxx::Object &parent); // private construction -> use factory () + virtual ~Table (); // forbid direct delete -> use Object::destroy() + private: Table (); // forbid standard constructor Table (const Table&); // forbid copy constructor - Table (Evasxx::Object &parent); // private construction -> use factory () - ~Table (); // forbid direct delete -> use Object::destroy() }; } // end namespace Elmxx diff --git a/elementaryxx/include/elementaryxx/Window.h b/elementaryxx/include/elementaryxx/Window.h index 2ebe8d1..71481ab 100644 --- a/elementaryxx/include/elementaryxx/Window.h +++ b/elementaryxx/include/elementaryxx/Window.h @@ -59,18 +59,6 @@ public: void setRotation (int rotation); void setSticky (bool sticky); - - /*! - * Get the transparency state of a window. - */ - bool getTransparent () const; - - /*! - * Set the transparency state of a window. - * - * Use setAlpha () instead. - */ - void setTransparent (bool transparent); //void setKeyboardMode (Elm_Win_Keyboard_Mode mode); @@ -80,14 +68,18 @@ public: void delResizeObject (const Evasxx::Object &subobj); -private: - Window (); // forbid standard constructor - Window (const Window&); // forbid copy constructor - + +protected: + // allow only construction for child classes // private construction -> use factory () Window (const std::string &name, Elm_Win_Type type); Window (Evasxx::Object &parent, const std::string &name, Elm_Win_Type type); - ~Window (); // forbid direct delete -> use Object::destroy() + virtual ~Window (); // forbid direct delete -> use Object::destroy() + +private: + Window (); // forbid standard constructor + Window (const Window&); // forbid copy constructor + }; } // end namespace Elmxx diff --git a/elementaryxx/src/Icon.cpp b/elementaryxx/src/Icon.cpp index f83a9de..012205a 100644 --- a/elementaryxx/src/Icon.cpp +++ b/elementaryxx/src/Icon.cpp @@ -36,24 +36,36 @@ void Icon::setStandard (const std::string &name) { elm_icon_standard_set (o, name.c_str ()); } + +/*std::string Icon::getStandard() +{ + // FIXME this doesn't link in application. Why? + return elm_icon_standard_get(o); +}*/ + void Icon::setSmooth (bool smooth) { elm_icon_smooth_set (o, smooth); } + void Icon::setNoScale (bool noScale) { elm_icon_no_scale_set (o, noScale); } + void Icon::setResizable (bool scaleUp, bool scaleDown) { elm_icon_resizable_set (o, scaleUp, scaleDown); } + void Icon::setFillOutside (bool fillOutside) { elm_icon_fill_outside_set (o, fillOutside); } + void Icon::setPrescale (int size) { elm_icon_prescale_set (o, size); } + } // end namespace Elmxx --