GL4 command processor.
This commit is contained in:
@@ -45,6 +45,7 @@ class Control {
|
||||
virtual void ResizeToFill(int32_t pad_left, int32_t pad_top,
|
||||
int32_t pad_right, int32_t pad_bottom) = 0;
|
||||
void Layout();
|
||||
virtual void Invalidate() {}
|
||||
|
||||
// TODO(benvanik): colors/brushes/etc.
|
||||
// TODO(benvanik): fonts.
|
||||
|
||||
@@ -114,10 +114,19 @@ void Win32Control::OnResize(UIEvent& e) {
|
||||
for (auto& child_control : children_) {
|
||||
auto win32_control = static_cast<Win32Control*>(child_control.get());
|
||||
win32_control->OnResize(e);
|
||||
win32_control->Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Win32Control::Invalidate() {
|
||||
InvalidateRect(hwnd_, nullptr, FALSE);
|
||||
for (auto& child_control : children_) {
|
||||
auto win32_control = static_cast<Win32Control*>(child_control.get());
|
||||
win32_control->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void Win32Control::set_cursor_visible(bool value) {
|
||||
if (is_cursor_visible_ == value) {
|
||||
return;
|
||||
|
||||
@@ -33,6 +33,7 @@ class Win32Control : public Control {
|
||||
int32_t bottom) override;
|
||||
void ResizeToFill(int32_t pad_left, int32_t pad_top, int32_t pad_right,
|
||||
int32_t pad_bottom) override;
|
||||
void Invalidate() override;
|
||||
|
||||
void set_cursor_visible(bool value) override;
|
||||
void set_enabled(bool value) override;
|
||||
|
||||
Reference in New Issue
Block a user