~azzar1/unity/fix-trash-li-blocking

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/QuicklistMenuItem.h

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
#include "Introspectable.h"
35
35
 
36
 
#define ITEM_INDENT_ABS        16
37
 
#define ITEM_CORNER_RADIUS_ABS 3
38
 
#define ITEM_MARGIN            4
 
36
namespace unity
 
37
{
39
38
 
40
 
typedef enum
 
39
enum QuicklistMenuItemType
41
40
{
42
 
  MENUITEM_TYPE_UNKNOWN    = 0,
 
41
  MENUITEM_TYPE_UNKNOWN = 0,
43
42
  MENUITEM_TYPE_LABEL,
44
43
  MENUITEM_TYPE_SEPARATOR,
45
44
  MENUITEM_TYPE_CHECK,
46
45
  MENUITEM_TYPE_RADIO,
47
 
} QuicklistMenuItemType;
 
46
};
48
47
 
49
 
class QuicklistMenuItem : public nux::View, public unity::debug::Introspectable
 
48
class QuicklistMenuItem : public nux::View, public debug::Introspectable
50
49
{
51
50
  NUX_DECLARE_OBJECT_TYPE(QuicklistMenuItem, nux::View);
52
51
public:
91
90
  std::string GetName() const;
92
91
  void AddProperties(GVariantBuilder* builder);
93
92
protected:
 
93
  static const int ITEM_INDENT_ABS = 16;
 
94
  static const int ITEM_CORNER_RADIUS_ABS = 3;
 
95
  static const int ITEM_MARGIN = 4;
94
96
 
95
97
  gchar*                _text;
96
98
  nux::Color            _textColor;
135
137
 
136
138
  bool _prelight;   //!< True when the mouse is over the item.
137
139
 
138
 
  void DrawText(cairo_t*   cr,
139
 
                int        width,
140
 
                int        height,
141
 
                nux::Color color);
 
140
  void DrawText(nux::CairoGraphics* cairo, int width, int height, nux::Color const& color);
 
141
  void DrawPrelight(nux::CairoGraphics* cairo, int width, int height, nux::Color const& color);
142
142
 
143
143
  // Introspection
144
144
  std::string _name;
146
146
  friend class QuicklistView;
147
147
};
148
148
 
 
149
} // NAMESPACE
 
150
 
149
151
#endif // QUICKLISTMENUITEM_H