remove unneeded test object,
[enigma2.git] / lib / gui / ewindowstyle.h
index 91f2f0b7414b143d35d00d3ce362bb60dc8afb9a..a2a9e67b65bd3d9374b48146b75a4355a6685150 100644 (file)
@@ -7,22 +7,13 @@ class gFont;
 
 #include <lib/base/object.h>
 
-SWIG_IGNORE(eWindowStyle);
-class eWindowStyle: public iObject
+class eWindowStyle_ENUMS
 {
 #ifdef SWIG
-       eWindowStyle();
+       eWindowStyle_ENUMS();
+       ~eWindowStyle_ENUMS();
 #endif
 public:
-#ifndef SWIG
-       virtual void handleNewSize(eWindow *wnd, eSize &size, eSize &offset) = 0;
-       virtual void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) = 0;
-       virtual void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) = 0;
-       virtual void setStyle(gPainter &painter, int what) = 0;
-       virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
-       virtual RESULT getFont(int what, ePtr<gFont> &font) = 0;
-#endif
-       virtual ~eWindowStyle() = 0;
        enum {
                styleLabel,
                styleListboxSelected,
@@ -30,18 +21,36 @@ public:
                styleListboxMarked,
                styleListboxMarkedAndSelected
        };
-       
+
        enum {
                frameButton,
                frameListboxEntry
        };
-       
+
        enum {
                fontStatic,
                fontButton,
                fontTitlebar
        };
 };
+
+SWIG_IGNORE(eWindowStyle);
+class eWindowStyle: public eWindowStyle_ENUMS, public iObject
+{
+#ifdef SWIG
+       eWindowStyle();
+#endif
+public:
+#ifndef SWIG
+       virtual void handleNewSize(eWindow *wnd, eSize &size, eSize &offset) = 0;
+       virtual void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) = 0;
+       virtual void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) = 0;
+       virtual void setStyle(gPainter &painter, int what) = 0;
+       virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
+       virtual RESULT getFont(int what, ePtr<gFont> &font) = 0;
+#endif
+       virtual ~eWindowStyle() = 0;
+};
 SWIG_TEMPLATE_TYPEDEF(ePtr<eWindowStyle>, eWindowStylePtr);
 
 SWIG_IGNORE(eWindowStyleManager);
@@ -56,10 +65,10 @@ public:
 #ifndef SWIG
        eWindowStyleManager();
        ~eWindowStyleManager();
+       static SWIG_VOID(int) getInstance(ePtr<eWindowStyleManager> &SWIG_NAMED_OUTPUT(mgr)) { mgr = m_instance; if (!mgr) return -1; return 0; }
 #endif
        void getStyle(int style_id, ePtr<eWindowStyle> &SWIG_OUTPUT);
        void setStyle(int style_id, eWindowStyle *style);
-       static SWIG_VOID(int) getInstance(ePtr<eWindowStyleManager> &SWIG_NAMED_OUTPUT(mgr)) { mgr = m_instance; if (!mgr) return -1; return 0; }
 private:
        static eWindowStyleManager *m_instance;
        std::map<int, ePtr<eWindowStyle> > m_current_style;