51
51
#define FONT_FACE "Ubuntu 13"
53
53
class QuicklistMenuItem;
61
class Tooltip : public BaseWindow, public Introspectable
63
NUX_DECLARE_OBJECT_TYPE (Tooltip, BaseWindow);
69
long ProcessEvent (IEvent& iEvent,
71
long processEventInfo);
73
void Draw (GraphicsEngine& gfxContext,
76
void DrawContent (GraphicsEngine& gfxContext,
79
void SetText (NString text);
81
void ShowTooltipWithTipAt (int anchor_tip_x, int anchor_tip_y);
84
const gchar* GetName ();
85
void AddProperties (GVariantBuilder *builder);
88
void RecvCairoTextChanged (StaticCairoText* cairo_text);
90
void PreLayoutManagement ();
92
long PostLayoutManagement (long layoutResult);
94
void PositionChildLayout (float offsetX,
97
void LayoutWindowElements ();
99
void NotifyConfigurationChange (int width,
102
//nux::CairoGraphics* _cairo_graphics;
105
nux::NString _labelText;
108
int _top_size; // size of the segment from point 13 to 14. See figure in _compute_full_mask_path.
110
cairo_font_options_t* _fontOpts;
112
nux::StaticCairoText* _tooltip_text;
113
nux::BaseTexture* _texture_bg;
114
nux::BaseTexture* _texture_mask;
115
nux::BaseTexture* _texture_outline;
118
float _anchor_height;
119
float _corner_radius;
121
nux::HLayout *_hlayout;
123
nux::SpaceLayout *_left_space; //!< Space from the left of the widget to the left of the text.
124
nux::SpaceLayout *_right_space; //!< Space from the right of the text to the right of the widget.
125
nux::SpaceLayout *_top_space; //!< Space from the left of the widget to the left of the text.
126
nux::SpaceLayout *_bottom_space; //!< Space from the right of the text to the right of the widget.
128
bool _cairo_text_has_changed;
129
void UpdateTexture ();
134
sigc::connection _on_text_changed_connection;
135
sigc::connection _on_font_changed_connection;
61
class Tooltip : public BaseWindow, public unity::Introspectable
63
NUX_DECLARE_OBJECT_TYPE(Tooltip, BaseWindow);
69
long ProcessEvent(IEvent& iEvent,
71
long processEventInfo);
73
void Draw(GraphicsEngine& gfxContext,
76
void DrawContent(GraphicsEngine& gfxContext,
79
void SetText(NString text);
81
void ShowTooltipWithTipAt(int anchor_tip_x, int anchor_tip_y);
84
const gchar* GetName();
85
void AddProperties(GVariantBuilder* builder);
88
void RecvCairoTextChanged(StaticCairoText* cairo_text);
90
void PreLayoutManagement();
92
long PostLayoutManagement(long layoutResult);
94
void PositionChildLayout(float offsetX,
97
void LayoutWindowElements();
99
void NotifyConfigurationChange(int width,
102
//nux::CairoGraphics* _cairo_graphics;
105
nux::NString _labelText;
108
int _top_size; // size of the segment from point 13 to 14. See figure in _compute_full_mask_path.
110
cairo_font_options_t* _fontOpts;
112
nux::StaticCairoText* _tooltip_text;
113
nux::BaseTexture* _texture_bg;
114
nux::BaseTexture* _texture_mask;
115
nux::BaseTexture* _texture_outline;
118
float _anchor_height;
119
float _corner_radius;
121
nux::HLayout* _hlayout;
123
nux::SpaceLayout* _left_space; //!< Space from the left of the widget to the left of the text.
124
nux::SpaceLayout* _right_space; //!< Space from the right of the text to the right of the widget.
125
nux::SpaceLayout* _top_space; //!< Space from the left of the widget to the left of the text.
126
nux::SpaceLayout* _bottom_space; //!< Space from the right of the text to the right of the widget.
128
bool _cairo_text_has_changed;
129
void UpdateTexture();
139
136
#endif // TOOLTIP_H