add preStart event and use it to load the cutlist
[enigma2.git] / lib / gui / ewindowstyle.h
index 4824aad62c44a2f8bcdd9ffa5d619ac428e785cd..5008cd6e1d73a6f76f759b8dff391318e23cafad 100644 (file)
@@ -7,13 +7,13 @@ class gFont;
 
 #include <lib/base/object.h>
 
-class eWindowStyle: public iObject
+class eWindowStyle_ENUMS
 {
+#ifdef SWIG
+       eWindowStyle_ENUMS();
+       ~eWindowStyle_ENUMS();
+#endif
 public:
-       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;
        enum {
                styleLabel,
                styleListboxSelected,
@@ -21,24 +21,39 @@ public:
                styleListboxMarked,
                styleListboxMarkedAndSelected
        };
-       
-       virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
-       
+
        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);
 class eWindowStyleManager: public iObject
 {
        DECLARE_REF(eWindowStyleManager);
@@ -50,21 +65,27 @@ 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> &style);
+       void getStyle(int style_id, ePtr<eWindowStyle> &SWIG_OUTPUT);
        void setStyle(int style_id, eWindowStyle *style);
-       static int getInstance(ePtr<eWindowStyleManager> &mgr) { mgr = m_instance; if (!mgr) return -1; return 0; }
 private:
        static eWindowStyleManager *m_instance;
        std::map<int, ePtr<eWindowStyle> > m_current_style;
 };
+SWIG_TEMPLATE_TYPEDEF(ePtr<eWindowStyleManager>, eWindowStyleManager);
+SWIG_EXTEND(ePtr<eWindowStyleManager>,
+       static ePtr<eWindowStyleManager> getInstance()
+       {
+               extern ePtr<eWindowStyleManager> NewWindowStylePtr(void);
+               return NewWindowStylePtr();
+       }
+);
 
-TEMPLATE_TYPEDEF(ePtr<eWindowStyleManager>, eWindowStyleManagerPtr);
-
+#ifndef SWIG
 class eWindowStyleSimple: public eWindowStyle
 {
        DECLARE_REF(eWindowStyleSimple);
-private:
        ePtr<gFont> m_fnt;
        gColor m_border_color_tl, m_border_color_br, m_title_color_back, m_title_color, m_background_color;
        
@@ -78,5 +99,6 @@ public:
        void drawFrame(gPainter &painter, const eRect &frame, int what);
        RESULT getFont(int what, ePtr<gFont> &font);
 };
+#endif
 
 #endif