mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
CtrlLib: InfoCtrl LeftZ/RightZ, .reference
This commit is contained in:
parent
e984ae10d9
commit
8f927568e2
3 changed files with 20 additions and 8 deletions
|
|
@ -21,8 +21,8 @@ struct App : TopWindow {
|
|||
|
||||
virtual void MouseMove(Point p, dword)
|
||||
{
|
||||
pos.Set(0, AsString(p.x), 40);
|
||||
pos.Set(1, AsString(p.y), 40);
|
||||
pos.Set(0, AsString(p.x), Zx(40));
|
||||
pos.Set(1, AsString(p.y), Zx(40));
|
||||
x.Set(PaintRect(dx, 100 * p.x / GetSize().cx));
|
||||
y.Set(PaintRect(dy, 100 * p.y / GetSize().cy));
|
||||
}
|
||||
|
|
@ -46,11 +46,11 @@ struct App : TopWindow {
|
|||
Sizeable();
|
||||
SetFrame(FieldFrame());
|
||||
AddFrame(status);
|
||||
status.AddFrame(pos.Right(100));
|
||||
status.AddFrame(pos.RightZ(100));
|
||||
status.AddFrame(x.Left(100));
|
||||
status.AddFrame(y.Left(100));
|
||||
dx.color = LtRed;
|
||||
dy.color = LtGreen;
|
||||
dx.color = SLtRed();
|
||||
dy.color = SLtGreen();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public:
|
|||
InfoCtrl& SetDefault(const String& d) { defaulttext = d; Refresh(); return *this; }
|
||||
InfoCtrl& Left(int w);
|
||||
InfoCtrl& Right(int w);
|
||||
InfoCtrl& LeftZ(int w) { return Left(Zx(w)); }
|
||||
InfoCtrl& RightZ(int w) { return Right(Zx(w)); }
|
||||
|
||||
typedef InfoCtrl CLASSNAME;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
topic "StatusBar and related widgets";
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,0#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
|
|
@ -9,6 +8,7 @@ topic "StatusBar and related widgets";
|
|||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}%EN-US
|
||||
[s0; [*+150 StatusBar related classes and routines]&]
|
||||
[s3;%- &]
|
||||
|
|
@ -115,7 +115,17 @@ defined width.&]
|
|||
[s7; [%-*C@3 w]-|Width of InfoCtrl.&]
|
||||
[s7; [*/ Return value]-|`*this for chaining.&]
|
||||
[s3; &]
|
||||
[s0; &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:InfoCtrl`:`:LeftZ`(int`):%- InfoCtrl[@(0.0.255) `&] [* LeftZ]([@(0.0.255) int]
|
||||
[*@3 w])&]
|
||||
[s2; Same as Left(Zx([%-*@3 w])) `- scales the width according to actual
|
||||
system font.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:InfoCtrl`:`:RightZ`(int`):%- InfoCtrl[@(0.0.255) `&] [* RightZ]([@(0.0.255) int
|
||||
] [*@3 w])&]
|
||||
[s2; Same as Right(Zx([%-*@3 w])) `- scales the width according to
|
||||
actual system font.&]
|
||||
[s0; &]
|
||||
[s0;%- &]
|
||||
[ {{10000@3 [s0; [*@(229)4 StatusBar]]}}&]
|
||||
|
|
@ -147,7 +157,7 @@ nfoCtrl]&]
|
|||
font. If there is no global WhenHelpDefault() callback defined
|
||||
for the Bar, defines it so that Bar will use StatusBar to display
|
||||
Menu and ToolBar informational texts.&]
|
||||
[s3; &]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:StatusBar`:`:`~StatusBar`(`):%- [@(0.0.255) `~][* StatusBar]()&]
|
||||
[s2; Default destructor.&]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue