aboutsummaryrefslogtreecommitdiff
path: root/src/ui/control.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-10 20:36:02 +0800
committercrupest <crupest@outlook.com>2018-11-10 20:36:02 +0800
commita465a23bdccff1680f056f61b321be717627601e (patch)
tree9f8af7f26a94105adab5c91ce87f64b5b8ad141e /src/ui/control.hpp
parent0e9e897d306c71ab46fd9b5371d811950124ee27 (diff)
downloadcru-a465a23bdccff1680f056f61b321be717627601e.tar.gz
cru-a465a23bdccff1680f056f61b321be717627601e.tar.bz2
cru-a465a23bdccff1680f056f61b321be717627601e.zip
Add foreground/background support.
Diffstat (limited to 'src/ui/control.hpp')
-rw-r--r--src/ui/control.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/control.hpp b/src/ui/control.hpp
index 8ac9ae72..7afc0c4e 100644
--- a/src/ui/control.hpp
+++ b/src/ui/control.hpp
@@ -221,7 +221,9 @@ namespace cru::ui
events::FocusChangeEvent get_focus_event;
events::FocusChangeEvent lose_focus_event;
- events::DrawEvent draw_event;
+ events::DrawEvent draw_content_event;
+ events::DrawEvent draw_background_event;
+ events::DrawEvent draw_foreground_event;
events::PositionChangedEvent position_changed_event;
events::SizeChangedEvent size_changed_event;
@@ -238,10 +240,12 @@ namespace cru::ui
virtual void OnDetachToWindow(Window* window);
private:
- void OnDraw(ID2D1DeviceContext* device_context);
+ void OnDrawCore(ID2D1DeviceContext* device_context);
protected:
virtual void OnDrawContent(ID2D1DeviceContext* device_context);
+ virtual void OnDrawForeground(ID2D1DeviceContext* device_context);
+ virtual void OnDrawBackground(ID2D1DeviceContext* device_context);
// For a event, the window event system will first dispatch event to core functions.
// Therefore for particular controls, you should do essential actions in core functions,