Ewol: Ewol Widget in OpenGl 0.10.0
Main Page
Related Pages
Namespaces
Classes
Files
Link-libs
lutin
ewol
echrono
etk
ejson
exml
esvg
egami
gale
ege
elog
ememory
enet
eproperty
esignal
etranslate
zeus
audio-ess
audio
audio-drain
audio-orchestra
audio-river
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
framework
atria-soft
ewol
ewol
widget
Menu.hpp
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
etk/types.hpp
>
9
#include <ewol/debug.hpp>
10
#include <
ewol/widget/Widget.hpp
>
11
#include <
ewol/widget/Button.hpp
>
12
#include <
ewol/widget/Sizer.hpp
>
13
#include <
ewol/widget/ContextMenu.hpp
>
14
15
namespace
ewol
{
16
namespace
widget {
17
class
MenuElement
{
18
public
:
19
MenuElement
() { };
20
int32_t m_localId;
21
int32_t m_parentId;
22
ewol::WidgetWeak
m_widgetPointer;
23
std::string m_label;
24
std::string m_image;
25
std::string m_message;
26
};
27
class
Menu
;
28
using
MenuShared
=
ememory::SharedPtr<ewol::widget::Menu>
;
29
using
MenuWeak
=
ememory::WeakPtr<ewol::widget::Menu>
;
33
class
Menu
:
public
ewol::widget::Sizer
{
34
public
:
35
esignal::Signal<std::string> signalSelect;
// event on a menu button or ...
36
protected
:
37
Menu
();
38
public
:
39
DECLARE_WIDGET_FACTORY(
Menu
,
"Menu"
);
40
virtual
~
Menu
();
41
private
:
42
void
subWidgetRemoveAll()
override
;
43
int32_t subWidgetAdd(
ewol::WidgetShared
_newWidget)
override
;
44
void
subWidgetRemove(
ewol::WidgetShared
_newWidget)
override
;
45
void
subWidgetUnLink(
ewol::WidgetShared
_newWidget)
override
;
46
private
:
47
std::vector<ewol::widget::MenuElement> m_listElement;
48
int32_t m_staticId;
// unique ID for every element of the menu ...
49
ewol::widget::ContextMenuWeak
m_widgetContextMenu;
50
int32_t
get
(
const
std::string& _label);
51
public
:
52
void
clear
();
53
int32_t addTitle(
const
std::string& _label,
const
std::string& _image=
""
,
const
std::string& _message =
""
);
54
int32_t add(int32_t _parent,
const
std::string& _label,
const
std::string& _image=
""
,
const
std::string& _message =
""
);
55
int32_t addSpacer();
56
void
remove
(int32_t _id);
57
private
:
58
void
onButtonPressed(
ewol::widget::ButtonWeak
_button);
59
};
60
};
61
};
62
ememory::WeakPtr< ewol::Widget >
Button.hpp
ContextMenu.hpp
Widget.hpp
types.hpp
ewol::widget::Menu
Definition:
Menu.hpp:33
Sizer.hpp
ewol
Definition:
Area.hpp:16
clear
void clear()
ememory::SharedPtr
ewol::widget::MenuElement
Definition:
Menu.hpp:17
ewol::widget::Sizer
Definition:
Sizer.hpp:23
Generated on Mon Oct 24 2016 15:35:52 for Ewol: Ewol Widget in OpenGl by
1.8.12