fixed refcount of eListboxPythonStringContent
[enigma2.git] / lib / gdi / grc.h
index 479317924d53f8887b9abb411cac1df165039d73..5eb8131425ac54ac0892da96201d93767879d177 100644 (file)
@@ -11,7 +11,7 @@
 #include <stack>
 #include <list>
 
 #include <stack>
 #include <list>
 
-#include <lib/base/estring.h>
+#include <string>
 #include <lib/base/ringbuffer.h>
 #include <lib/base/elock.h>
 #include <lib/gdi/erect.h>
 #include <lib/base/ringbuffer.h>
 #include <lib/base/elock.h>
 #include <lib/gdi/erect.h>
@@ -29,7 +29,7 @@ struct gOpcode
                renderPara,
                setFont,
                
                renderPara,
                setFont,
                
-               fill, clear,
+               fill, fillRegion, clear,
                blit,
 
                setPalette,
                blit,
 
                setPalette,
@@ -55,10 +55,15 @@ struct gOpcode
                        eRect area;
                } *fill;
 
                        eRect area;
                } *fill;
 
+               struct pfillRegion
+               {
+                       gRegion region;
+               } *fillRegion;
+
                struct prenderText
                {
                        eRect area;
                struct prenderText
                {
                        eRect area;
-                       eString text;
+                       std::string text;
                        int flags;
                } *renderText;
 
                        int flags;
                } *renderText;
 
@@ -117,7 +122,7 @@ struct gOpcode
 };
 
                /* gRC is the singleton which controls the fifo and dispatches commands */
 };
 
                /* gRC is the singleton which controls the fifo and dispatches commands */
-class gRC: public virtual iObject
+class gRC: public iObject
 {
 DECLARE_REF;
 private:
 {
 DECLARE_REF;
 private:
@@ -169,10 +174,21 @@ public:
        void setForegroundColor(const gColor &color);
 
        void setFont(gFont *font);
        void setForegroundColor(const gColor &color);
 
        void setFont(gFont *font);
+               /* flags only THESE: */
+       enum
+       {
+                       // todo, make mask. you cannot align both right AND center AND block ;)
+               RT_HALIGN_RIGHT = 1,
+               RT_HALIGN_CENTER = 2,
+               RT_HALIGN_BLOCK = 4,
+               RT_VALIGN_CENTER = 8
+       };
        void renderText(const eRect &position, const std::string &string, int flags=0);
        void renderText(const eRect &position, const std::string &string, int flags=0);
+       
        void renderPara(eTextPara *para, ePoint offset=ePoint(0, 0));
 
        void fill(const eRect &area);
        void renderPara(eTextPara *para, ePoint offset=ePoint(0, 0));
 
        void fill(const eRect &area);
+       void fill(const gRegion &area);
        
        void clear();
        
        
        void clear();