DropList::DropWidth, DropList::DropWidthZ

git-svn-id: svn://ultimatepp.org/upp/trunk@600 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-11-05 08:55:42 +00:00
parent a8f5eddbab
commit ff43e04590
4 changed files with 329 additions and 18 deletions

View file

@ -42,6 +42,7 @@ private:
PopUpTable list;
Index<Value> key;
Value value;
int dropwidth;
const Convert *valueconvert;
const Display *valuedisplay;
bool displayall;
@ -114,6 +115,8 @@ public:
DropList& AlwaysDrop(bool e = true);
DropList& SetStyle(const Style& s) { MultiButton::SetStyle(s); return *this; }
DropList& NotNull(bool b = true) { notnull = b; return *this; }
DropList& DropWidth(int w) { dropwidth = w; return *this; }
DropList& DropWidthZ(int w) { dropwidth = HorzLayoutZoom(w); return *this; }
DropList& SetScrollBarStyle(const ScrollBar::Style& s) { list.SetScrollBarStyle(s); return *this; }

View file

@ -66,7 +66,7 @@ void DropList::Drop() {
SetFocus();
WhenDrop();
list.SetCursor(key.Find(value));
list.PopUp(this);
list.PopUp(this, dropwidth);
}
void DropList::Select() {
@ -248,6 +248,7 @@ DropList::DropList()
list.Normal();
list.WhenSelect = THISBACK(Select);
list.WhenCancel = THISBACK(Cancel);
dropwidth = 0;
}
DropList::~DropList() {}

View file

@ -104,7 +104,7 @@ void PopUpTable::PopUp(Ctrl *owner, int width)
{
Rect r = owner->GetScreenRect();
r.right = r.left + width;
PopUp(owner, r.left, r.top, r.bottom, width);
PopUp(owner, r.left, r.top, r.bottom, width ? width : r.Width());
}
void PopUpTable::PopUp(Ctrl *owner)

View file

@ -1,16 +1,323 @@
TITLE("DropList")
COMPRESSED
120,156,221,90,143,143,20,87,29,255,87,94,10,197,189,115,111,153,153,221,189,221,219,171,4,122,8,18,20,13,80,141,185,236,50,179,51,111,111,167,55,59,179,206,204,222,113,26,201,9,141,6,82,137,63,248,113,77,9,65,219,90,32,162,7,52,70,3,8,5,163,177,18,20,35,144,82,196,82,84,138,177,233,217,250,11,66,197,239,251,49,191,246,246,118,247,246,126,20,109,19,110,118,230,189,239,251,126,63,223,159,239,251,222,160,132,150,46,21,226,194,18,161,197,127,185,213,184,164,212,12,55,63,168,167,82,217,126,69,74,247,15,175,255,116,95,127,247,202,88,111,170,139,80,17,129,74,50,35,38,179,233,164,152,146,122,225,31,49,41,74,105,41,153,18,179,82,95,42,155,76,102,133,156,106,40,142,147,31,52,164,108,182,159,76,146,226,210,18,41,147,150,196,76,42,155,202,138,201,76,86,130,185,146,32,72,66,70,74,139,169,100,86,74,231,52,236,168,249,65,37,155,236,239,222,216,11,147,146,100,37,32,46,136,189,82,42,147,146,132,164,32,165,96,41,49,
155,77,137,153,116,54,217,215,219,155,83,149,170,171,91,38,95,75,23,69,73,236,47,138,153,126,224,121,219,182,109,9,49,37,48,14,82,64,76,20,82,192,170,8,239,132,148,148,17,211,125,66,95,58,43,102,133,36,16,79,103,132,116,174,170,216,74,101,102,209,211,45,69,207,8,57,221,197,64,162,251,163,162,152,129,41,189,241,222,37,98,42,3,130,102,147,169,116,54,35,192,226,146,36,37,147,146,152,148,250,250,164,116,111,58,147,43,99,69,195,118,126,240,75,91,190,252,248,199,55,244,60,181,9,13,58,98,255,250,156,12,255,175,182,173,234,39,117,199,37,207,20,213,92,129,60,14,88,230,8,182,221,2,26,124,92,16,122,4,161,80,88,25,19,18,66,66,74,167,187,16,71,223,251,130,182,4,207,43,5,228,81,12,15,200,133,135,4,132,170,181,162,161,171,13,41,121,188,61,105,109,45,32,254,16,26,24,71,179,36,136,184,68,249,101,249,65,71,234,71,252,207,202,149,122,69,25,194,57,128,118,25,152,201,248,142,31,141,239,31,31,31,223,113,247,33,
252,59,254,239,31,30,120,231,218,175,119,158,159,188,57,241,181,91,127,189,179,123,247,27,111,94,121,238,198,185,35,167,47,221,187,178,107,239,209,203,199,143,28,158,56,125,100,239,241,137,157,63,251,250,43,83,175,30,222,249,250,91,215,142,253,103,251,196,205,235,23,190,181,239,254,111,46,60,124,233,237,27,119,31,94,249,221,219,123,254,177,253,226,55,111,238,120,254,204,31,246,191,246,206,177,223,159,249,198,212,137,59,231,159,249,251,221,191,92,250,243,197,61,83,223,253,193,251,7,38,206,127,231,153,147,47,158,250,219,206,169,211,151,15,220,124,118,215,7,23,79,222,123,253,214,183,79,252,116,234,254,237,131,87,247,188,116,224,216,123,71,175,190,123,231,250,79,206,238,216,243,243,95,189,112,242,151,111,30,190,126,255,212,91,231,110,77,158,185,188,239,143,87,46,30,57,52,53,249,227,235,231,191,255,236,209,131,219,119,189,112,227,222,213,139,239,29,248,224,208,159,38,207,190,113,234,185,131,103,39,118,62,56,248,207,239,157,186,244,234,185,127,189,246,226,222,
151,15,253,118,114,223,145,151,247,76,62,216,253,238,243,39,46,236,255,234,196,47,30,92,187,125,231,254,248,237,175,92,125,255,120,20,160,205,101,221,65,163,186,54,132,93,84,181,173,17,29,188,8,185,101,140,28,108,96,149,184,6,178,74,104,68,49,106,240,190,100,91,21,250,81,3,133,201,61,154,53,106,34,100,128,45,36,16,177,8,4,164,44,123,72,49,245,47,98,13,233,38,26,198,99,114,15,157,139,170,138,110,59,253,104,180,140,77,68,76,156,140,101,75,96,45,78,105,194,96,178,20,249,232,160,34,86,173,10,231,196,196,163,190,209,49,78,80,76,113,80,205,129,69,138,99,104,19,118,87,43,174,178,124,45,251,11,235,186,216,46,41,42,238,74,128,116,152,207,0,202,62,13,205,2,202,166,229,2,101,21,59,142,98,235,198,24,42,43,35,24,185,22,172,76,56,39,235,18,193,16,44,4,140,197,209,152,85,67,170,98,34,156,24,74,192,75,71,31,50,145,194,105,195,44,159,246,168,238,150,17,174,84,221,49,62,223,212,80,73,55,140,128,162,161,0,
127,137,168,22,158,180,96,22,1,128,12,103,68,21,155,50,61,132,77,108,235,42,250,44,91,105,172,138,19,232,243,156,23,96,195,82,117,32,135,156,42,86,245,18,12,91,173,59,85,67,97,116,184,71,48,150,2,129,224,139,91,86,224,53,12,3,12,3,214,65,12,27,87,109,236,96,147,12,27,163,171,249,218,71,49,213,50,44,219,137,3,25,19,19,147,113,203,113,84,178,76,215,65,216,85,19,137,174,58,153,124,186,138,225,88,72,175,84,13,92,193,100,52,181,46,221,28,50,48,152,144,110,115,43,243,184,245,213,23,39,198,2,32,172,177,236,138,66,109,75,195,37,88,90,227,58,145,123,86,112,248,109,197,116,0,85,160,82,199,194,6,203,197,57,47,186,16,10,62,23,116,52,42,99,163,138,109,22,239,152,61,1,6,78,153,64,239,128,249,33,213,210,48,24,132,59,138,193,106,3,121,0,65,71,175,232,134,194,167,98,39,17,94,4,98,177,62,2,180,168,183,12,184,182,65,185,18,24,87,233,6,113,249,115,224,20,228,119,14,162,107,56,62,14,40,134,
81,84,212,225,2,205,32,200,251,233,133,60,246,54,136,128,30,153,124,216,181,85,62,9,241,103,224,107,176,27,100,42,89,54,206,7,86,65,216,102,166,131,181,4,26,48,116,98,3,84,124,98,104,49,27,119,169,54,38,150,22,204,96,78,226,209,111,71,70,32,171,14,207,131,144,148,78,43,41,105,164,241,93,73,33,118,76,162,150,39,173,74,104,128,172,45,216,94,165,105,50,24,190,201,126,81,39,148,151,201,241,105,111,186,114,168,62,179,17,18,133,105,217,18,201,203,124,97,0,9,160,239,127,137,5,50,7,169,152,44,228,143,136,166,79,186,118,129,69,134,134,228,147,196,77,252,47,65,74,157,63,250,35,145,111,93,158,78,64,42,7,162,35,9,220,52,214,131,87,121,118,19,247,112,234,230,236,129,187,128,195,87,192,177,89,100,240,195,53,153,25,25,205,22,139,152,170,103,133,33,61,19,239,12,5,240,206,20,252,136,170,115,6,184,55,41,16,171,32,40,194,234,49,58,36,206,70,118,181,18,126,192,192,138,77,127,196,66,34,135,248,29,177,116,109,58,
187,32,168,63,51,16,215,103,135,126,115,218,214,0,29,222,25,3,173,23,103,193,26,67,214,9,167,185,13,53,163,101,80,38,207,179,230,138,134,223,233,76,65,10,83,113,136,41,96,65,126,140,214,80,143,181,98,131,84,55,244,39,248,135,28,131,228,216,177,109,134,41,53,53,82,88,164,129,112,73,164,53,176,60,204,243,185,89,171,20,33,147,130,219,26,212,147,193,3,137,124,85,112,209,118,108,0,232,172,51,53,188,181,94,194,118,48,247,230,118,36,147,222,68,38,63,18,177,156,65,2,89,40,26,233,121,94,45,210,44,88,179,109,146,49,233,148,86,194,174,245,133,149,187,104,64,200,133,24,245,216,9,49,92,151,2,65,228,181,117,34,179,17,177,174,32,77,178,64,195,37,218,136,221,154,109,50,161,116,50,143,8,21,97,57,82,30,135,163,39,45,161,88,189,56,77,78,136,196,164,136,182,241,23,106,80,197,105,211,139,231,56,251,1,115,85,5,10,77,185,71,36,193,219,166,220,180,78,189,159,80,156,245,80,229,53,8,206,51,130,86,180,44,99,102,212,
24,193,58,204,234,16,107,60,57,20,159,217,151,72,144,102,175,234,18,111,244,227,76,154,217,140,29,48,54,40,85,0,50,155,110,0,194,217,145,230,186,136,54,54,211,141,153,98,171,101,242,169,164,128,182,98,131,5,215,170,234,42,176,184,92,94,62,0,101,157,188,220,177,85,121,57,181,16,87,94,138,77,185,167,230,200,75,136,12,204,238,252,7,48,192,2,98,150,132,138,160,34,173,101,198,88,3,246,51,91,173,52,53,101,78,240,145,210,74,67,127,105,160,156,64,51,253,220,170,29,102,228,37,186,187,44,89,53,83,123,68,116,54,191,10,123,164,180,229,85,63,220,146,98,195,45,1,129,240,57,0,186,113,231,20,128,41,133,14,2,176,74,230,5,141,142,89,148,170,155,109,189,210,73,130,36,243,58,74,142,230,244,228,72,104,181,146,131,36,130,144,167,152,249,54,244,65,99,10,21,109,70,133,204,167,113,81,13,54,9,59,77,148,31,170,25,218,143,34,180,181,227,242,96,18,41,34,218,192,134,57,108,115,116,218,1,160,78,252,6,35,22,14,0,190,65,
155,35,4,11,46,127,59,162,148,116,219,239,67,250,13,81,102,247,164,212,41,43,129,202,161,50,82,12,111,247,59,99,193,149,64,177,104,149,197,59,153,203,55,213,119,52,35,101,90,205,193,254,74,45,67,222,166,136,25,53,235,95,180,89,114,71,183,169,157,149,220,11,210,145,152,30,179,54,226,170,161,168,120,238,134,24,128,184,24,248,205,63,16,254,206,38,108,194,145,192,221,161,1,183,192,205,170,98,91,113,45,91,30,148,243,243,28,199,194,164,23,50,150,121,69,134,23,55,98,122,75,151,91,165,61,93,235,160,179,194,166,53,234,108,148,177,58,28,108,22,194,26,169,59,29,129,50,211,111,227,211,86,121,116,19,177,142,228,108,50,136,20,169,164,63,226,245,68,201,111,122,116,17,231,22,18,108,124,67,167,53,237,202,61,71,31,169,199,97,254,61,100,120,186,135,44,42,198,193,134,219,225,39,74,164,57,31,222,98,180,145,25,189,238,93,231,101,211,103,172,234,83,213,205,74,209,240,92,46,120,209,162,128,10,55,155,102,145,64,87,217,182,50,70,206,69,
252,147,18,171,248,52,152,86,112,250,164,155,67,254,49,35,61,100,100,160,162,214,241,153,159,34,133,172,207,123,211,121,83,55,32,219,177,53,250,199,237,245,132,162,22,169,54,11,218,42,155,74,176,225,120,149,44,155,217,21,63,158,149,123,34,63,201,49,22,159,68,78,163,168,71,179,131,31,248,67,200,68,218,232,88,167,38,63,162,227,81,255,192,196,183,80,88,72,247,180,224,169,82,238,118,203,186,211,78,255,146,45,83,95,122,120,175,231,164,24,78,100,177,11,17,190,108,1,213,175,31,213,103,179,142,41,7,159,42,177,65,111,49,18,77,58,135,124,241,209,94,96,216,84,171,82,177,76,31,189,16,104,90,222,199,50,186,29,165,103,234,158,89,79,3,147,132,106,255,248,156,147,117,2,215,98,228,98,30,67,211,65,168,171,54,26,219,93,203,186,163,181,5,54,10,221,30,158,236,91,67,198,102,64,150,87,59,1,208,196,197,3,223,143,209,188,217,182,164,139,202,40,9,107,252,38,0,189,56,50,134,92,101,152,181,225,33,125,168,88,195,166,138,19,249,214,
78,66,78,66,6,198,230,124,168,194,200,116,20,129,12,117,172,137,169,211,123,22,101,172,15,149,105,159,37,56,121,167,5,153,137,170,250,86,108,56,243,28,29,226,115,61,98,90,236,16,209,208,115,102,7,56,175,237,3,238,99,90,87,60,80,109,12,102,117,205,22,230,176,3,205,107,24,110,228,153,31,70,32,246,34,48,175,69,216,225,15,189,67,3,166,217,176,138,152,45,132,156,183,85,134,33,199,200,201,78,199,144,5,132,154,2,22,62,61,138,88,77,49,120,43,127,108,139,107,215,176,15,199,58,146,103,160,126,175,88,26,142,147,198,127,211,141,178,183,1,8,237,28,188,157,118,228,216,44,104,84,232,46,108,187,74,100,158,119,61,169,136,27,92,127,8,178,27,191,127,75,175,226,149,74,179,134,28,158,215,88,106,205,153,43,226,30,157,5,6,156,158,49,211,82,150,236,18,34,25,95,53,44,114,201,140,108,195,98,188,182,45,142,121,183,26,249,254,130,70,82,72,124,170,2,41,195,240,222,250,55,31,129,67,27,94,250,74,42,90,138,13,133,52,145,203,
235,137,176,155,147,81,216,205,217,162,190,202,24,133,154,131,93,56,152,19,236,1,161,206,112,199,77,112,47,5,184,211,13,43,32,52,194,53,128,138,53,215,133,162,12,94,99,147,236,27,53,132,71,176,201,174,96,133,175,152,241,141,175,98,24,214,168,135,182,26,186,107,6,160,66,102,47,241,157,55,157,69,175,157,145,187,122,53,216,22,178,91,148,222,61,183,153,238,158,1,16,228,169,183,223,223,3,7,61,83,160,161,187,58,118,194,229,129,64,46,145,129,67,210,202,194,161,87,4,249,64,168,206,107,38,187,158,72,10,66,114,143,147,176,237,235,238,35,78,96,111,159,82,170,124,115,215,72,221,244,154,81,68,239,145,91,100,96,111,150,13,20,228,39,130,134,73,60,120,92,209,65,247,164,193,69,164,217,24,83,146,74,214,249,14,201,23,169,128,252,71,127,232,19,173,91,53,161,11,224,51,142,89,209,224,118,84,16,113,130,219,55,160,54,230,195,190,29,208,190,189,207,87,83,133,5,122,253,208,84,22,176,80,8,153,217,76,61,132,186,175,255,31,154,11,196,
158,141,238,26,58,91,68,161,255,99,94,53,39,75,104,233,16,141,67,24,252,201,255,23,250,111,248,99,
topic "DropList";
[2 $$0,0#00000000000000000000000000000000:Default]
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,0#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[{_}
[s0;i448;a25;kKO9;:DropList`:`:class: [@(0.0.255) class]_[* DropList]_:_[@(0.0.255) public]_
[*@3 MultiButton], [@(0.0.255) public]_[*@3 Convert]&]
[s0; &]
[s2;%%
@@image:337&143
ƒƒéÿø¯œí×ϰޘáì玎ÛàÕÜÀ©¼ÎùÕŠªÑ±©¨˜¼©±˜Ä<EFBFBD>´ðÁ¨Ùâ×­þ˜ÞÚÃúÐÃÿ
¥èÜéÿÕÔèõÌÞƒ½ßÊí­Ý½<EFBFBD>ð²çÂôéêÎæÌð¢®óœ˜Â¡³¤»ñð¼ÑœÞŒŠý̳ùÙá²¾ðúãžÖ¥œ­òªÖï
çÚ¹¿ƒÆË£³Éà¨Úú»âÀá°½ÑäÕÌ© ð°¸Ú¬ŒªžŠ£ÜùÖÌòœý å°¿Û»ž¿˜üžö¦»ÎÁÀ÷ʤ§ Ò°©§°ü
Žï²Ã˜Çü×ãçúã<EFBFBD>Öó±
&]
[s2;%% This widget provides the selection of values from the drop`-down
list. List is organized in key`-value pairs; when item is selected,
the key of items becomes the new DropList value (as used by SetData/GetData
interface). The value of DropList does not necessarily have to
be in the list as key, you can e.g. assign a value to DropList
with empty list and fill the list later.&]
[s2;%% Both key and value are of generic Value type. You can associate
specific Display and Convert with the list and that way use DropList
to represent any type of value (colors, line width, fonts etc..).&]
[s2;%% DropList also implements the single`-direction Convert interface,
where Format is defined as key`->value translation.&]
[s2;%% Note: DropBox is implementation helper class used to share
some code between DropList and similar classes. DropBox is derived
from Ctrl.&]
[s3; &]
[ {{10000F(128)G(128)@1 [s0;%% [* DropList public members]]}}&]
[s4; &]
[s5;:DropList`:`:Style`:`:typedef: [@(0.0.255) typedef]_[_^MultiButton`:`:Style^ MultiBut
ton`::Style]_[* Style]&]
[s2;%% The chameleon style of DropList is in fact the Style of MultiButton
base class.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:WhenDrop: [_^Callback^ Callback]_[* WhenDrop]&]
[s2;%% This callback is called [* before] the list is displayed. Client
code can (re)create the list in the callback.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Add`(const Value`&`,const Value`&`): [_^DropList^ DropList][@(0.0.255) `&
]_[* Add]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 key],
[@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 value])&]
[s2;%% Adds a new item to the list, [%-*@3 key] determines the value
of item, [%-*@3 value] is displayed in the value area and in the
list.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Add`(const Value`&`): [_^DropList^ DropList][@(0.0.255) `&]_[* Add]([@(0.0.255) c
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 value])&]
[s2;%% Same as Add(value, value).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Remove`(int`): [@(0.0.255) void]_[* Remove]([@(0.0.255) int]_[*@3 i])&]
[s2;%% Removes drop list item [%-*@3 i].&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:ClearList`(`): [@(0.0.255) void]_[* ClearList]()&]
[s2;%% Clears the list.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Clear`(`): [@(0.0.255) void]_[* Clear]()&]
[s2;%% Clears the list and sets DropList to Null.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:AddSeparator`(`): [_^DropList^ DropList][@(0.0.255) `&]_[* AddSeparator]()
&]
[s2;%% Adds horizontal ruler separator item. This item cannot be
selected.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Drop`(`): [@(0.0.255) void]_[* Drop]()&]
[s2;%% Forces the list to `"drop`".&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetDropLines`(int`): [_^DropList^ DropList][@(0.0.255) `&]_[* SetDropLines
]([@(0.0.255) int]_[*@3 d])&]
[s2;%% Sets the number of lines in dropped list.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetIndex`(int`): [@(0.0.255) void]_[* SetIndex]([@(0.0.255) int]_[*@3 i])&]
[s2;%% Sets the value of list item [%-*@3 i] to be the current value.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GetIndex`(`)const: [@(0.0.255) int]_[* GetIndex]()_[@(0.0.255) const]&]
[s2;%% Returns the index of current value of DropList in the list.
Note that the current value isnot required to be in the list,
in that case `-1 is returned.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GoBegin`(`): [@(0.0.255) void]_[* GoBegin]()&]
[s2;%% If there are any items, selects the first one.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GoEnd`(`): [@(0.0.255) void]_[* GoEnd]()&]
[s2;%% If there are any items, selects the last one.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:HasKey`(const Value`&`)const: [@(0.0.255) bool]_[* HasKey]([@(0.0.255) con
st]_[_^Value^ Value][@(0.0.255) `&]_[*@3 k])_[@(0.0.255) const]&]
[s2;%% Tests whether key [%-*@3 k] is in the list. The search is fast
([^topic`:`/`/Core`/src`/Indext`$en`-us`#`:`:Index`:`:Index`(`)^ Index]
based).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:FindKey`(const Value`&`)const: [@(0.0.255) int]_[* FindKey]([@(0.0.255) co
nst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 k])_[@(0.0.255) const]&]
[s2;%% Returns the index of key [%-*@3 k] in the list; returns `-1
if not found. The search is fast ([^topic`:`/`/Core`/src`/Indext`$en`-us`#`:`:Index`:`:Index`(`)^ I
ndex] based).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Find`(const Value`&`)const: [@(0.0.255) int]_[* Find]([@(0.0.255) const]_[_^Value^ V
alue][@(0.0.255) `&]_[*@3 k])_[@(0.0.255) const]&]
[s2;%% Same as FindKey(k).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:FindValue`(const Value`&`)const: [@(0.0.255) int]_[* FindValue]([@(0.0.255) c
onst]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])_[@(0.0.255) const]&]
[s2;%% Finds the index of item with value [%-*@3 v]. If there is none,
returns `-1.&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:GetCount`(`)const: [@(0.0.255) int]_[* GetCount]()_[@(0.0.255) const]&]
[s2;%% Returns the count of items in the list.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Trim`(int`): [@(0.0.255) void]_[* Trim]([@(0.0.255) int]_[*@3 n])&]
[s2;%% Trims the count of items in the list to [%-*@3 n].&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GetKey`(int`)const: [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[* Ge
tKey]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&]
[s2;%% Returns the key at index [%-*@3 i].&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GetValue`(int`)const: [_^Value^ Value]_[* GetValue]([@(0.0.255) int]_[*@3 i])
_[@(0.0.255) const]&]
[s2;%% Returns the value at index [%-*@3 i].&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GetValue`(`)const: [_^Value^ Value]_[* GetValue]()_[@(0.0.255) const]&]
[s2;%% Returns the first value from the list that has the key equal
to the current value of DropList. (Note that the GetData/SetData
interface of DropList uses the key).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetValue`(int`,const Value`&`): [@(0.0.255) void]_[* SetValue]([@(0.0.255) i
nt]_[*@3 i], [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s2;%% Replaces the value at index [%-*@3 i].&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetValue`(const Value`&`): [@(0.0.255) void]_[* SetValue]([@(0.0.255) cons
t]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s2;%% Sets the first value in the list that has the key equal to
the current value of DropList.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:operator`[`]`(int`)const: [_^Value^ Value]_[* operator`[`]]([@(0.0.255) in
t]_[*@3 i])_[@(0.0.255) const]&]
[s2;%% Same as GetValue(i).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Adjust`(`): [@(0.0.255) void]_[* Adjust]()&]
[s2;%% Checks whether the current DropList value is present as key
in the list. If it is not and list is not empty, first list item
is selected.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:Adjust`(const Value`&`): [@(0.0.255) void]_[* Adjust]([@(0.0.255) const]_[_^Value^ V
alue][@(0.0.255) `&]_[*@3 k])&]
[s2;%% Checks whether the current DropList value is present as key
in the list. If it is not and list is not empty, DropList is
assigned [%-*@3 k].&]
[s3; &]
[s4; &]
[s5;:DropList`:`:GetList`(`)const: [@(0.0.255) const]_[_^PopUpTable^ PopUpTable][@(0.0.255) `&
]_[* GetList]()_[@(0.0.255) const]&]
[s2;%% Returns the ArrayCtrl derived object representing the dropdown
list. &]
[s3; &]
[s4; &]
[s5;:DropList`:`:ListObject`(`): [_^PopUpTable^ PopUpTable][@(0.0.255) `&]_[* ListObject]()
&]
[s2;%% Returns a reference to internal PopUpTable that is used to
show items.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetConvert`(const Convert`&`): [_^DropList^ DropList][@(0.0.255) `&]_[* Se
tConvert]([@(0.0.255) const]_[_^Convert^ Convert][@(0.0.255) `&]_[*@3 cv])&]
[s2;%% Sets the converting object for list values `- list values
are converted first before being displayed in either view area
of DropList or in list. Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetDisplay`(int`,const Display`&`): [_^DropList^ DropList][@(0.0.255) `&
]_[* SetDisplay]([@(0.0.255) int]_[*@3 i], [@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&
]_[*@3 d])&]
[s2;%% Sets the display for item [%-*@3 i] in the list. Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetDisplay`(const Display`&`): [_^DropList^ DropList][@(0.0.255) `&]_[* Se
tDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 d])&]
[s2; [%% Sets the common display ][*@3 d][%% for items in the list and
view area. Returns `*this. If specific displays for list items
(]SetDisplay[@(64) (][@(0.0.255) int][@(64) _][@3 i][@(64) , ][@(0.0.255) const][@(64) _][^`:`:Display^@(64) D
isplay][@(64) `&_][@3 d][@(64) )]) or view area (ValueDisplay[@(64) (][@(0.0.255) const][@(64) _
][^`:`:Display^@(64) Display][@(64) `&_][@3 d][@(64) )]) are defined,
they take the precedence.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetLineCy`(int`): [_^DropList^ DropList][@(0.0.255) `&]_[* SetLineCy]([@(0.0.255) i
nt]_[*@3 lcy])&]
[s2;%% Sets the line height of the list item in pixels. Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetDisplay`(const Display`&`,int`): [_^DropList^ DropList][@(0.0.255) `&
]_[* SetDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 d],
[@(0.0.255) int]_[*@3 lcy])&]
[s2;%% Same as SetDisplay(d), SetLineCy(lcy). Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:ValueDisplay`(const Display`&`): [_^DropList^ DropList][@(0.0.255) `&]_[* V
alueDisplay]([@(0.0.255) const]_[_^Display^ Display][@(0.0.255) `&]_[*@3 d])&]
[s2;%% Sets the display object to be used in view area of DropList.
Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:DisplayAll`(bool`): [_^DropList^ DropList][@(0.0.255) `&]_[* DisplayAll]([@(0.0.255) b
ool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% In this mode, if the current value of DropList is not present
as the key in the list, the value itself is used to be displayed
in the view area. Default is off. Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:DropFocus`(bool`): [_^DropList^ DropList][@(0.0.255) `&]_[* DropFocus]([@(0.0.255) b
ool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% In this mode, dropping down the list and closing it (either
by selecting the item or canceling the selection) brings the
keyboard focus to the widget. Default is on. Returns `*this.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:NoDropFocus`(`): [_^DropList^ DropList][@(0.0.255) `&]_[* NoDropFocus]()&]
[s2;%% Same as DropFocus(false).&]
[s3; &]
[s4; &]
[s5;:DropList`:`:AlwaysDrop`(bool`): [_^DropList^ DropList][@(0.0.255) `&]_[* AlwaysDrop]([@(0.0.255) b
ool]_[*@3 e]_`=_[@(0.0.255) true])&]
[s2;%% If this mode is active, drop button is enabled even when the
list is empty, allowing the client code to deffer the list creation
until the WhenDrop callback.&]
[s3; &]
[s4; &]
[s5;:DropList`:`:SetStyle`(const DropList`:`:Style`&`): [_^DropList^ DropList][@(0.0.255) `&
]_[* SetStyle]([@(0.0.255) const]_[_^DropList`:`:Style^ Style][@(0.0.255) `&]_[*@3 s])&]
[s2;%% Sets the chameleon style of DropList.&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:NotNull`(bool`): [_^DropList^ DropList][@(0.0.255) `&]_[* NotNull]([@(0.0.255) b
ool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s2;%% Specifies that Null value is illegal for DropList. If active,
Null value is not [^Ctrl`:`:Accept^ accepted].&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:DropWidth`(int`): [_^DropList^ DropList][@(0.0.255) `&]_[* DropWidth]([@(0.0.255) i
nt]_[*@3 w])&]
[s2;%% Override the with of dropped PopUpTable drop`-down list (which
by default is the same as the width of DropList).&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:DropWidthZ`(int`): [_^DropList^ DropList][@(0.0.255) `&]_[* DropWidthZ]([@(0.0.255) i
nt]_[*@3 w])&]
[s2;%% Same as DropWidth(HorzLayoutZoom([%-*@3 w])) `- this adjusts
the width according to current standard GUI font zooming.&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:SetScrollBarStyle`(const ScrollBar`:`:Style`&`): [_^DropList^ DropList
][@(0.0.255) `&]_[* SetScrollBarStyle]([@(0.0.255) const]_[_^ScrollBar`:`:Style^ ScrollBa
r`::Style][@(0.0.255) `&]_[*@3 s])&]
[s2;%% Sets the chameleon style of Scrollbar of PopUpTable drop`-down
list.&]
[s3;%% &]
[s4; &]
[s5;:DropList`:`:operator`=`(const Value`&`): [@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&
]_[* operator`=]([@(0.0.255) const]_[_^Value^ Value][@(0.0.255) `&]_[*@3 v])&]
[s5;:DropList`:`:operator Value`(`)const: [@(0.0.255) operator]_Value()_[@(0.0.255) const
]&]
[s2;%% These methods are deprecated in favor of operator`~ and operator<<`=.&]
[s0; &]
[s0; &]
[ {{10000F(128)G(128)@1 [s0;%% [* DropList Related Global Functions]]}}&]
[s0; &]
[s0;%% These are simple utility function for filling DropList`'s
list and MapConvert.&]
[s3; &]
[s4; &]
[s5;:Add`(DropList`&`,const VectorMap`<Value`,Value`>`&`): [@(0.0.255) void]_[* Add]([_^DropList^ D
ropList][@(0.0.255) `&]_[*@3 list], [@(0.0.255) const]_[_^VectorMap^ VectorMap][@(0.0.255) <
][_^Value^ Value], [_^Value^ Value][@(0.0.255) >`&]_[*@3 values])&]
[s2;%% Fills the DropList from VectorMap.&]
[s3; &]
[s4; &]
[s5;:Add`(MapConvert`&`,const VectorMap`<Value`,Value`>`&`): [@(0.0.255) void]_[* Add]([_^MapConvert^ M
apConvert][@(0.0.255) `&]_[*@3 convert], [@(0.0.255) const]_[_^VectorMap^ VectorMap][@(0.0.255) <
][_^Value^ Value], [_^Value^ Value][@(0.0.255) >`&]_[*@3 values])&]
[s2;%% Fills the MapConvert from VectorMap.&]
[s3; &]
[s4; &]
[s5;:Add`(DropList`&`,const MapConvert`&`): [@(0.0.255) void]_[* Add]([_^DropList^ DropList
][@(0.0.255) `&]_[*@3 list], [@(0.0.255) const]_[_^MapConvert^ MapConvert][@(0.0.255) `&]_[*@3 c
onvert])&]
[s2;%% Fills the DropList from MapConvert.&]
[s0; ]