21 #ifndef __ANTARES_TOOLBOX_EXT_SOURCE_ACTION_PANEL_H__
22 #define __ANTARES_TOOLBOX_EXT_SOURCE_ACTION_PANEL_H__
24 #include <action/action.h>
26 #include <wx/menuitem.h>
27 #include <ui/common/component/panel.h>
29 namespace Antares::Private::Window
35 using Vector = std::vector<ActionPanel*>;
43 static void DrawBackgroundWithoutItems(wxWindow& obj, wxDC& dc,
const wxRect& rect);
53 const Antares::Action::Context::Ptr& context,
63 void onDraw(wxPaintEvent&);
69 virtual void SetFocus();
72 void onEnter(wxMouseEvent&);
73 void onLeave(wxMouseEvent&);
74 void onMouseDown(wxMouseEvent&);
75 void onMouseDownCollapseExpand();
76 void onMouseDownBehaviorSelect(wxWindow* obj);
77 void drawArrows(wxDC& dc,
const wxRect& rect);
79 void prepareAll(
bool force =
false);
81 void relayoutAllParents();
82 void computeTotalChildrenCount();
84 void onBehaviorMerge(wxCommandEvent&);
85 void onBehaviorOverwrite(wxCommandEvent&);
86 void onBehaviorSkip(wxCommandEvent&);
90 Antares::Action::Context::Ptr pContext;
94 wxColour pBackgroundColor;
95 wxColour pBackgroundColorLight;
96 wxColour pStateColor[Antares::Action::stMax];
100 wxString pBehaviorText;
104 bool pCanDoSomething;
105 bool phasCreatedChildren;
111 Antares::Action::State pState;
112 Antares::Action::Behavior pBehavior;
119 DECLARE_EVENT_TABLE()
AncestorType::Ptr Ptr
The most suitable smart ptr for the class.
Definition: action.h:41
Panel implementation.
Definition: panel.h:34
Definition: action-panel.h:32
ActionPanel(wxWindow *parent, ActionPanel *parentPanel, const Antares::Action::Context::Ptr &context, const Antares::Action::IAction::Ptr &action)
Default constructor.
Definition: action-panel.cpp:53
uint pTotalChildrenCount
The total of all children for all sub-nodes.
Definition: action-panel.h:116
@ itemHeight
Optimal height for a single item.
Definition: action-panel.h:40
std::vector< ActionPanel * > Vector
Array.
Definition: action-panel.h:35
virtual ~ActionPanel()
Destructor.
Definition: action-panel.cpp:108