diff --git a/uppsrc/CtrlCore/CtrlCore.h b/uppsrc/CtrlCore/CtrlCore.h index 618971164..23cd75f39 100644 --- a/uppsrc/CtrlCore/CtrlCore.h +++ b/uppsrc/CtrlCore/CtrlCore.h @@ -996,8 +996,8 @@ public: virtual bool IsShowEnabled() const; - virtual Rect GetOpaqueRect(); - virtual Rect GetVoidRect(); + virtual Rect GetOpaqueRect() const; + virtual Rect GetVoidRect() const ; virtual void Updated(); diff --git a/uppsrc/CtrlCore/CtrlDraw.cpp b/uppsrc/CtrlCore/CtrlDraw.cpp index 9ce9bb03c..6ce63ec2e 100644 --- a/uppsrc/CtrlCore/CtrlDraw.cpp +++ b/uppsrc/CtrlCore/CtrlDraw.cpp @@ -217,12 +217,12 @@ void Ctrl::SyncScroll() } } -Rect Ctrl::GetOpaqueRect() +Rect Ctrl::GetOpaqueRect() const { return IsTransparent() ? Rect(0, 0, 0, 0) : GetSize(); } -Rect Ctrl::GetVoidRect() +Rect Ctrl::GetVoidRect() const { return Rect(0, 0, 0, 0); } diff --git a/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp b/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp index 8eb112f87..b76d1685b 100644 --- a/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp +++ b/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp @@ -632,6 +632,21 @@ during modal dialog lifetime are displayed with enabled Ctrls.&] enabled.&] [s3;%- &] [s4;%- &] +[s5;:Ctrl`:`:GetOpaqueRect`(`)const:%- [@(0.0.255) virtual] [_^Rect^ Rect]_[* GetOpaqueRect +]()_[@(0.0.255) const]&] +[s2; Returns the rectangle of view area that is opaque (is completely +filled when painting the widget). The default implementation +returns the whole view area if Transparent flag is set, empty +rectangle otherwise. Paint routine uses this information to optimize.&] +[s3;%- &] +[s4;%- &] +[s5;:Ctrl`:`:GetVoidRect`(`)const:%- [@(0.0.255) virtual] [_^Rect^ Rect]_[* GetVoidRect]()_ +[@(0.0.255) const]&] +[s2; Returns the rectangle of view area that is fully transparent +(nothing is painted in that rectangle). Paint routine uses this +information to optimize.&] +[s3;%- &] +[s4;%- &] [s5;:Ctrl`:`:OverPaint`(`)const:%- [@(0.0.255) virtual] [@(0.0.255) int]_[* OverPaint]()_[@(0.0.255) c onst]&] [s2;b17;a17; This method can returns non`-zero number that represents @@ -641,20 +656,6 @@ This is useful to represent some specific skinning effect (like glare around the button). Default implementation returns zero.&] [s3;%- &] [s4;%- &] -[s5;:Ctrl`:`:GetOpaqueRect`(`):%- [@(0.0.255) virtual] [_^`:`:Rect^ Rect]_[* GetOpaqueRect]( -)&] -[s2;b17;a17; Returns the rectangle of view area that is opaque (is -completely filled when painting the widget). The default implementation -returns the whole view area if Transparent flag is set, empty -rectangle otherwise. Paint routine uses this information to optimize.&] -[s3;%- &] -[s4;%- &] -[s5;:Ctrl`:`:GetVoidRect`(`):%- [@(0.0.255) virtual] [_^`:`:Rect^ Rect]_[* GetVoidRect]()&] -[s2;b17;a17; Returns the rectangle of view area that is fully transparent -(nothing is painted in that rectangle). Paint routine uses this -information to optimize.&] -[s3;%- &] -[s4;%- &] [s5;:Ctrl`:`:Close`(`):%- [@(0.0.255) virtual] [@(0.0.255) void]_[* Close]()&] [s2;b17;a17; Closes top`-level Ctrl. If Ctrl is not top`-level, has no effect. If it is and is open in host GUI (either as pop`-up diff --git a/uppsrc/CtrlLib/Static.cpp b/uppsrc/CtrlLib/Static.cpp index 166a15357..ee63b6842 100644 --- a/uppsrc/CtrlLib/Static.cpp +++ b/uppsrc/CtrlLib/Static.cpp @@ -95,7 +95,7 @@ void LabelBox::AssignAccessKeys(dword used) LabelBox::~LabelBox() {} -Rect LabelBox::GetVoidRect() +Rect LabelBox::GetVoidRect() const { Rect r = GetSize(); r.left += 2; @@ -180,7 +180,7 @@ void LabelBox::Paint(Draw& w) w.End(); } -Rect ParentCtrl::GetVoidRect() +Rect ParentCtrl::GetVoidRect() const { return GetSize(); } diff --git a/uppsrc/CtrlLib/StaticCtrl.h b/uppsrc/CtrlLib/StaticCtrl.h index afdd98e83..6005bdc84 100644 --- a/uppsrc/CtrlLib/StaticCtrl.h +++ b/uppsrc/CtrlLib/StaticCtrl.h @@ -39,7 +39,7 @@ class LabelBox : public Label { public: virtual void Paint(Draw& w); virtual void AssignAccessKeys(dword used); - virtual Rect GetVoidRect(); + virtual Rect GetVoidRect() const; public: LabelBox(); @@ -57,7 +57,7 @@ class ParentCtrl : public Ctrl { Size minsize; public: - virtual Rect GetVoidRect(); + virtual Rect GetVoidRect() const; virtual Size GetStdSize() const; virtual Size GetMinSize() const; diff --git a/uppsrc/CtrlLib/TabCtrl.cpp b/uppsrc/CtrlLib/TabCtrl.cpp index 7e79bcf96..d555865b6 100644 --- a/uppsrc/CtrlLib/TabCtrl.cpp +++ b/uppsrc/CtrlLib/TabCtrl.cpp @@ -162,7 +162,7 @@ void TabCtrl::Tabs::Paint(Draw& w) static_cast(GetParent())->PaintTabs(w); } -Rect TabCtrl::GetOpaqueRect() +Rect TabCtrl::GetOpaqueRect() const { return pane.GetRect(); } diff --git a/uppsrc/CtrlLib/TabCtrl.h b/uppsrc/CtrlLib/TabCtrl.h index 47bf9f09c..429506b28 100644 --- a/uppsrc/CtrlLib/TabCtrl.h +++ b/uppsrc/CtrlLib/TabCtrl.h @@ -9,7 +9,7 @@ public: virtual bool Key(dword key, int count); virtual bool HotKey(dword key); virtual void Layout(); - virtual Rect GetOpaqueRect(); + virtual Rect GetOpaqueRect() const; virtual Value GetData() const; virtual void SetData(const Value& data);