Windows.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 <etk/Color.hpp>
13 #include <list>
14 
15 namespace ewol {
16  namespace widget {
17  class Windows;
18  using WindowsShared = ememory::SharedPtr<ewol::widget::Windows>;
19  using WindowsWeak = ememory::WeakPtr<ewol::widget::Windows>;
23  class Windows : public ewol::Widget {
24  public:
27  protected:
29  int32_t m_colorBg;
30  protected:
31  Windows();
32  void init() override;
33  public:
34  virtual ~Windows();
35  // internal event at ewol system:
36  public:
37  void sysDraw();
38  protected:
40  public:
45  void setSubWidget(ewol::WidgetShared _widget);
46  protected:
47  std::list<ewol::WidgetShared> m_popUpWidgetList;
48  public:
53  void popUpWidgetPush(ewol::WidgetShared _widget);
57  void popUpWidgetPop();
62  size_t popUpCount() {
63  return m_popUpWidgetList.size();
64  }
65  protected:
66  void systemDraw(const ewol::DrawProperty& _displayProp) override;
67  public:
68  void onRegenerateDisplay() override;
69  void onChangeSize() override;
70  ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override;
71  void requestDestroyFromChild(const ewol::ObjectShared& _child) override;
72  ewol::ObjectShared getSubObjectNamed(const std::string& _objectName) override;
73  protected:
77  virtual void onChangePropertyTitle();
81  virtual void onChangePropertyColor();
82  };
83  }
84 }
85 
Windows basic interface.
Definition: Windows.hpp:23
virtual void onChangePropertyTitle()
Called when property change: Title.
Definition: DrawProperty.hpp:15
ewol::WidgetShared m_subWidget
main sub-widget of the Windows.
Definition: Windows.hpp:39
void onRegenerateDisplay() override
Event generated when a redraw is needed.
ememory::SharedPtr< ewol::resource::ColorFile > m_resourceColor
theme color property (name of file in propertyColorConfiguration)
Definition: Windows.hpp:28
int32_t m_colorBg
Default background color of the windows.
Definition: Windows.hpp:29
void requestDestroyFromChild(const ewol::ObjectShared &_child) override
Called by a whild that want to remove pointer of itself from the current list of his parrent...
eproperty::Value< std::string > propertyColorConfiguration
Configuration file of the windows theme.
Definition: Windows.hpp:25
ewol::ObjectShared getSubObjectNamed(const std::string &_objectName) override
Retrive an object with his name (in the global list)
Definition: Area.hpp:16
virtual void onChangePropertyColor()
Called when property change: Color configuration file.
void popUpWidgetPop()
Remove the pop-up on top.
Widget class is the main widget interface, it hase some generic properties: :** known his parent :** ...
Definition: Widget.hpp:73
std::list< ewol::WidgetShared > m_popUpWidgetList
List of pop-up displayed.
Definition: Windows.hpp:47
ewol::WidgetShared getWidgetAtPos(const vec2 &_pos) override
get the widget at the specific windows absolute position
eproperty::Value< std::string > propertyTitle
Current title of the windows.
Definition: Windows.hpp:26
size_t popUpCount()
Get the number of pop-up.
Definition: Windows.hpp:62
void systemDraw(const ewol::DrawProperty &_displayProp) override
{SYSTEM} extern interface to request a draw ... (called by the drawing thread [Android, X11, ...]) This function generate a clipping with the viewport openGL system. Like this a widget draw can not draw over an other widget
void setSubWidget(ewol::WidgetShared _widget)
Set the main widget of the application.
void popUpWidgetPush(ewol::WidgetShared _widget)
Add a pop-up on the Windows.
void onChangeSize() override
Parent have set the size and the origin. the container need to update the subwidget property...