20
20
#ifndef PLACES_GROUP_H
21
21
#define PLACES_GROUP_H
23
#include <sigc++/sigc++.h>
25
23
#include <Nux/Nux.h>
26
24
#include <Nux/VLayout.h>
27
#include <Nux/BaseWindow.h>
28
#include <NuxCore/Math/MathInc.h>
25
#include <Nux/HLayout.h>
26
#include <Nux/TextureArea.h>
28
#include <sigc++/sigc++.h>
30
#include "IconTexture.h"
31
#include "Introspectable.h"
30
32
#include "StaticCairoText.h"
32
#include "Introspectable.h"
34
#include <sigc++/trackable.h>
35
#include <sigc++/signal.h>
36
#include <sigc++/functors/ptr_fun.h>
37
#include <sigc++/functors/mem_fun.h>
39
#include "IconTexture.h"
41
34
class PlacesGroup : public nux::View
45
38
PlacesGroup (NUX_FILE_LINE_PROTO);
48
void SetEmblem (const char *path_to_emblem);
49
void SetTitle (const char *title);
41
void SetIcon (const char *icon);
42
void SetName (const char *name);
51
44
void SetChildLayout (nux::Layout *layout);
52
45
nux::Layout * GetChildLayout ();
57
nux::StaticCairoText *_label;
58
nux::StaticCairoText *_title;
64
nux::Layout *_content;
65
IconTexture *_icon_texture;
49
void SetCounts (guint n_visible_items_in_unexpand_mode, guint n_total_items);
51
void SetChildUnexpandHeight (guint height);
53
void SetExpanded (bool is_expanded);
56
sigc::signal<void> expanded;
61
long ProcessEvent (nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
62
void Draw (nux::GraphicsEngine &GfxContext, bool force_draw);
63
void DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw);
65
static gboolean OnIdleRelayout (PlacesGroup *self);
67
void RecvMouseClick (int x, int y, unsigned long button_flags, unsigned long key_flags);
68
void RecvMouseEnter (int x, int y, unsigned long button_flags, unsigned long key_flags);
69
void RecvMouseLeave (int x, int y, unsigned long button_flags, unsigned long key_flags);
66
72
nux::VLayout *_group_layout;
67
73
nux::HLayout *_header_layout;
69
static gboolean OnIdleRelayout (PlacesGroup *self);
74
virtual long ProcessEvent (nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo);
75
virtual void Draw (nux::GraphicsEngine &GfxContext, bool force_draw);
76
virtual void DrawContent (nux::GraphicsEngine &GfxContext, bool force_draw);
77
virtual void PostDraw (nux::GraphicsEngine &GfxContext, bool force_draw);
74
nux::Layout *_content_layout;
77
nux::StaticCairoText *_name;
78
nux::StaticCairoText *_expand_label;
79
nux::TextureArea *_expand_icon;
84
guint _n_visible_items_in_unexpand_mode;
86
guint _child_unexpand_height;