/[enigma]/enigma/src/gui.hh
ViewVC logotype

Diff of /enigma/src/gui.hh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by reallysoft, Sun May 25 08:37:36 2003 UTC revision 1.7 by dheck, Thu Jun 19 22:19:18 2003 UTC
# Line 73  namespace gui Line 73  namespace gui
73          int get_y() const { return area.y; }          int get_y() const { return area.y; }
74          int get_w() const { return area.w; }          int get_w() const { return area.w; }
75          int get_h() const { return area.h; }          int get_h() const { return area.h; }
76          Menu * get_menu() const { return menu; }          Menu *get_menu() const { return menu; }
77    
78          void set_parent(Widget *parent) { m_parent = parent; }          void set_parent(Widget *parent) { m_parent = parent; }
79    
# Line 131  namespace gui Line 131  namespace gui
131      public:      public:
132          void set_spacing (int pixels);          void set_spacing (int pixels);
133      protected:      protected:
134          List(int spacing=5)          List(int spacing=5) : m_spacing(spacing)
             : m_spacing(spacing)  
135          {}          {}
136      private:      private:
137          int m_spacing;          // # of pixels between container items          int m_spacing;          // # of pixels between container items
# Line 167  namespace gui Line 166  namespace gui
166          std::string imgname;          std::string imgname;
167      };      };
168    
169        enum Alignment {
170            ALIGN_LEFT,
171            ALIGN_RIGHT,
172            ALIGN_CENTER
173        };
174    
175        class Label : public Widget {
176        public:
177            Label (const std::string &text);
178            
179            // Widget interface
180            void draw (px::GC &gc, const px::Rect &r);
181    
182            // Methods
183            void set_text (const std::string &text);
184            void set_font (px::Font *font);
185            void set_alignment (Alignment horizontal, Alignment vertical=ALIGN_CENTER);
186        private:
187            // Variables.
188            std::string m_text;
189            px::Font *m_font;
190            Alignment m_halign, m_valign;
191        };
192    
193      class Button : public Widget {      class Button : public Widget {
194      protected:      protected:
195          Button() : highlighted(false) {}          Button() : highlighted(false) {}
# Line 216  namespace gui Line 239  namespace gui
239      class ImageButton : public PushButton {      class ImageButton : public PushButton {
240      public:      public:
241          ImageButton(const std::string &unselected,          ImageButton(const std::string &unselected,
242                      const std::string &selected);                      const std::string &selected,
243                        ActionListener *al=0);
244      private:      private:
245          // Widget interface.          // Widget interface.
246          void draw(px::GC &gc, const px::Rect &r);          void draw(px::GC &gc, const px::Rect &r);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26