Sign in Join
Wiki copytemporary

Reference: MSEgui: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Widgets
22
33### TSimpleWidget
44
55see also [[Reference: MSEgui/TSimpleWidget]]
66
77### TMainMenuWidget
88
99### TSimpleWidget
1010
1111### TMseFormWidget
1212
1313Use it in order to insert a tcustomform descendant into another widget at designtime. Does not try to load resources in "create".
1414
1515 tmseform descendants ( MainForm, SimpleForm,.. )
1616
1717 Client area of the form & parent of its widgets ( against which the widgets
1818 are placed and colored ) is presented by the "container" property
1919 not "container.frame.clientarea"
2020
2121 CanClose is called :
2222
2323 - on receiving "ek_close" by window
2424 - for modal window, on focus change
2525
2626 - within parent window's "CanClose" where all nested windows are
2727 checked for OnCloseQuery & OnClose - if any sets "mr_none" then the parent window
2828 can't close as well
2929
3030 - from nested window's "CanParentClose"
3131 - from own "CanParentClose"
3232
3333 - some componnets build oneself in own "Loaded" procedure :
3434 = widget grids
3535 = database access components
3636 = ...
3737
3838 The "form.show" has parameter "transientfor".
3939 The window Z-order is above the "transientfor" window. The exact behaviour
4040 depends on the window manager.
4141
4242 caption
4343 - run-time caption on the title bar
4444
4545 color
4646 - color behind the client ( contaner ) area
4747
4848 container
4949 - the real parent of form's widgets, <see "tformscrollbox">
5050
5151 cursor
5252 - the mouse over cursor shape
5353
5454 enabled - "false" disables all child widgets
5555
5656 face
5757 <see "tfacecomp"> + some more options
5858
5959 font
6060 <see "tfont">
6161
6262 frame
6363 <see "tframecomp"> + some more options
6464
6565 icon
6666 <see "timage">
6767
6868 mainmenu
6969 <see tmainmenu>
7070
7171 name
7272 - name to refer when programming
7373
7474 options:
7575
7676 fo_main
7777 - assigns this from as the aplication GUI-face & event receiver
7878 - causes the icon of this form to be icon of the application
7979
8080 fo_terminateonclose
8181 - causes the application to terminate once the form has closed ( doesn't depend on "fo_main" )
8282
8383 fo_freeonclose
8484 - causes the form (even being modal) to release its memory on closure or OK-return from "CanClose"
8585
8686 fo_defaultpos
8787 - lets the WM to position the form initially
8888
8989 fo_screencentered
9090 - causes the form initially to show in center of the apllication work area
9191
9292 fo_closeonesc
9393 - causes the form to close on "Esc" key pressed ( with MR_ESCAPE & "OnCloseQuery" firing )
9494
9595 fo_cancelonesc
9696 - causes the form to close on "Esc" key pressed ( with MR_CANCEL & "OnCloseQuery" firing )
9797
9898 fo_closeonenter
9999 - causes the form to close on "Enter" key pressed ( with MR_OK & "OnCloseQuery" firing )
100100
101101 fo_closeonf10
102102 - causes the form to close on "F10" key pressed ( with MR_F10 & "OnCloseQuery" firing )
103103
104104 fo_globalshortcuts
105105 - allows on-this-form "ao_globalshortcut" actions to trigger
106106
107107 Notes :
108108 = shortcuts for modal not "fo_localshortcut" forms are processed by app
109109 = shortcuts for "fo_globalshorcut" forms are processed by the owning window
110110
111111 fo_localshortcuts
112112 - disables triggering shortcuts of on-this-form actions
113113
114114 fo_autoreadstat
115115 - for "cs_ismodule" forms, before "OnLoaded" fires, rereads all statvars from the bound stafile/memorystream
116116
117117 fo_autowritestat
118118 - in "CanClose", after "OnClose" fires [ and before app termination for "fo_terminateonlose" form ],
119119 rewrites all statvars to the stafile/memorystream
120120 - for datamodules, does this before "OnDestroy" fires
121121
122122 fo_savepos
123123 - saves/restores Z-order, size & scree coordinates of the form
124124 as soon as the stat data are ready
125125
126126 fo_savestate
127127 - for top-level form, saves/restores "VSize", "Active" & "Visible"
128128 as soon as the stat data are ready
129129
130130 optionswidget
131131 <see "any widget">
132132 optionswindow
133133 <see "any window">
134134 popupmenu
135135 <see "tpopupmenu">
136136 stafile
137137 <see "tstafile">
138138 stavarname
139139 taborder
140140 tag
141141
142142 visible - for a form, only affects its childs widgets
143143
144144 Events:
145145
146146 activate = to set focused & redraw the invalidated area
147147
148148 oncreate
149149 - fires before "Loaded" procedure is called
150150 - fires after creating the widget & its subwidgets but before the final arrangement
151151 - forms arent' yet visible on return
152152
153153 Since "Loaded" procedure hasn't yet worked at this point then
154154 database contents, values of widget grid's subwidgets
155155 are invalid in this event ***
156156
157157 onloaded
158158 - fires once "Loaded" procedure of owns & all form's widgets finishes
159159 - processed after "OnCreate"
160160 - on finishing, forms aren't yet visible
161161
162162 oneventloopstart ( main forms only )
163163 - only applicable to main forms
164164 - fires once all application GUI is built and shown
165165 ( and ready to user's interaction )
166166
167167 onactivate
168168 - see {any_widget.OnActivate}
169169
170170 onenter
171171 = see {any_widget.OnEnter}
172172
173173 onfocus
174174 - see {any_widget.OnFocus}
175175
176176
177177 onwindowactivechanged
178178 - fires on :
179179 = touching another window even on clicking in a behind-modal window ( or its title bar )
180180 = 1-st showing the window
181181 - reactivating the window
182182
183183 onbeforepaint
184184 - fires at the very beginning of "paint", before drawing canvas
185185
186186 onpaint
187187 - fires in "paint" procedure, between drawing canvas and contained widgets
188188
189189 onafterpaint (doafterpaint)
190190 - fires just on return from "paint" procedure
191191
192192 onapplicationactivechanged
193193 - fires :
194194 = if the application gets/looses input focus
195195
196196 onasyncevent (doasyncevent)
197197 - fires on calling {this_form}.asyncevent(atag) from any place of the application
198198 once delivered by the app even queue
199199
200200 "atag" set by caller(s) helps to branch within "onasyncevent", to identify the caller, etc ***
201201 generally, doesn't fire instantly because these events are delivered through the app event queue ***
202202
203203 onchildmouseevent
204204 - fires on any mouse activity over its child widget(s) not the (containing) widget oneself
205205
206206 for forms, it even fires on enetering "container" therefore it appears as if to be the form itself ***
207207
208208 onchildscaled
209209 - see {any_widget.OnChildScaled}
210210
211211 onclientmouseevent
212212 - fires on any mouse activity over areas expecting user's mouse input (not titlebars/frames/...)
213213
214214 onclose
215215 - fires in "CanClose" if "modalresult <> mr_none"
216216
217217 onclosequery
218218 - fires in "CanClose" before "OnClose"
219219 - "mr_none" set on return prevents the window (and its parent) from closing
220220 ( "OnClose" is also bypassed )
221221
222222 ondeactivate
223223 - see {any_widget.OnDeactivate}
224224
225225 ondefocus
226226 - see {any_widget.OnDeFocus}
227227
228228 ondestroy
229229 - fires on in-code calling "BeforeDestruction"
230230
231231 ondestroyed
232232 - fires on return from the form's destructor ( when all resources are freed )
233233
234234 onterminatequery
235235 - fires on an attempt to terminate the app
236236 - by setting "var terminate:= false", allows to cancel termination
237237
238238 Termination by debugger/OS facilities can't be blocked this way ( win32 )***
239239
240240 onterminated
241241 - fires for not-yet-destroyed forms, once the app event loop finishes
242242 - may be caused by any closure of the main app form
243243 ( app termination, WM/OS facilities, )
244244
245245 onwindowdestroyed
246246 - fires once a descendant window is destroyed
247247 ( for a main form, when a modal simple form is closed by any way,.. )
248248
249249 onevent
250250 - fires on receiving an event
251251 = for simple forms, it's only "ek_loaded"
252252
253253 There can be more if the form is connected to object_event sending
254254 components or if the application uses object events, for example by calling
255255 tguicomponent.postcomponentevent. ****
256256
257257 onexit
258258 - see {any_widget.OnExit}
259259
260260 onfocusedwidgetchanged
261261 - for a "prev-new" parent-wide focused wigdets pair, fires once installing new focus has finished,
262262 after "OnFocus"
263263 - resends for all contained widgets
264264 - doesn't fire if the "prev-new" pair don't really change
265265
266266 onfontheightdelta
267267 - see {any_widget.OnFontHeightDelta}
268268
269269 onhide
270270 - fires at beginnig of own/parent's
271271 = hide
272272 = hidden
273273 = destroying
274274 = setting "visible:= false"
275275 = closing the window ( receiving event "ek_close",.. )
276276 = calling "window.close"
277277
278278 onidle
279279 - fires everytime when the app GUI event queue gets empty
280280 - to stop calling for a while, set "again" parameter to "false" (the initial value );
281281
282282 DON'T DO ANYTHING AFFECTING THE APP EVENT QUEUE ( MODAL WINDOWS, "ShowMessage", Sleep(N),... ) IN THIS HANDLER.
283283 MODAL WINDOWS CAUSE RECURSION !
284284
285285 A code fragment:
286286
287287 again:= i < 5;
288288 if not again then exit;
289289
290290 onkeydown
291291 - fires on pressing down a keyboard key over the client area when none of child widgets is focused
292292
293293 onkeyup
294294 - fires on releasing a keyboard key over the client area when none of child widgets is focused
295295
296296 onmouseevent
297297 - fires on any mouse activity over the client area
298298
299299 onmove
300300 - see {any_window.OnMove}
301301
302302 onpopup
303303 - see {any_widget.OnPopup}
304304
305305 onresize
306306 - see {any_widget.OnResize}
307307
308308 onshortcut
309309 - fires before built-in shorcut processing
310310 - "info.eventstate=es_processed" set in "OnShortcut" prevents
311311 the event from further auto-processing
312312
313313 The app
314314 - recognizes & takes registered shortcuts from app event queue
315315 - passes the shocrcut event to each of its windows until the event
316316 is processed otherwise processes it by oneself
317317
318318
319319 onshow
320320 - fires if the widget is visible:
321321 = on calling "Show" method
322322 = on return from "Loaded" procedure
323323 = on showing the parent widget
324324 - since called at end, allows to adjust the default behavior
325325
326326 onshowhint
327327 - see {any_widget.OnShowHint}
328328
329329 onstatbeforeread
330330 - fires before loading statvars from the disk file
331331
332332 onstatafterread
333333 - fires once statvars are loaded from the disk file
334334
335335 onstatupdate
336336 - fires at 1-st stage before updating GUI "state/pos" for read statvars
337337 or
338338 - fires at pre-last stage before saving GUI "state/pos"
339339
340340 onstatread
341341 - fires at 2-nd stage before updating GUI "state/pos" for read statvars
342342
343343 onstatwrite
344344 - fires at last stage before saving GUI "state/pos"
345345
346346 pon stat reading, non-minimized visible windows are shown,
347347 the active window is activated
348348
349349### TDockFormWidget
350350
351351### TPaintbox
352352
353353How to draw line (or circle) on tpaintbox? In event onpaint:
354354
355355``` pascal
356356
357357 procedure tmainfo.paintboxonpaint(const sender: twidget; const canvas: tcanvas);
358358 begin
359359 with sender,canvas do begin
360360 drawline(nullpoint,pointty(size),cl_yellow);
361361 //diagonal line across widget
362362 drawellipse(makerect(makepoint(bounds_cx div 2,bounds_cy div 2), size),cl_red);
363363 //circle (or ellipse) centered in widget
364364 end;
365365 end;
366366```
367367
368368Makepoint and makerect are in msegraphutils.
369369
370370### TEventWidget
371371
372372A widget which publishes all possible events of a twidget. Normally it is better to implement your own specialized descendant of an existing widget instead to use teventwidget.
373373
374374### TButton
375375
376376- A rectangular clickable area that can show text/bitmap.
377377
378378\- Main properties:
379379
380-`Caption: read/write the text that appear on top of it.`\
381-`onexecute: read/write the address of a procedure (event handler) to be executed when clicked.`
380+``` pascal
381+Caption: read/write the text that appear on top of it.
382+onexecute: read/write the address of a procedure (event handler) to be executed when clicked.
383+```
382384
383385### TStockGlyphButton
384386
385387### TRichButton
386388
387389### TLabel
388390
389391- Draws a piece of text on the given surface (canvas: screen/printer/bitmap).
390392
391393\- Main properties:
392394
393-`Caption: read/write the piece of text.`
395+```text
396+Caption: read/write the piece of text.
397+```
394398
395399See also [[Reference: MSEgui/TLabel|TLabel]]
396400
397401### TGroupBox
398402
399403### TStepBox
400404
401405### TStringDisp
402406
403407- A read only version of TStringEdit, difference from TLabel: has a frame around it.
404408
405409-Main properties:
406410
407-`Value: read/write the text that are showed.`\
408-`Caption: A label normally describing the purpose or meaning of the presented text, it can be positioned around the frame.`
411+```text
412+Value: read/write the text that are showed.
413+Caption: A label normally describing the purpose or meaning of the presented text, it can be positioned around the frame.
414+```
409415
410416### TByteStringDisp
411417
412418### TIntegerDisp
413419
414420### TRealDisp
415421
416422### TDateTimeDisp
417423
418424### TBooleanDisp
419425
420426### TToolBar
421427
422428### TDrawGrid
423429
424430### TStringGrid
425431
426432### TTabBar
427433
428434### TTabPage
429435
430436### TTabWidget
431437
432438### TDockHandle
433439
434440### TDockPanel
435441
436442### TSpliter
437443
438444 A widget very similar to "tspacer" but :
439445 - designed to rearrange areas occupied by adjacent widgets
440446 - a linked widget may only enlarge by "eating" the opposite one,
441447 so the summary area of both widgets don't change
442448 - has GUI look ( hatched grip, color etc) switched on by default
443449 - facilitates run-time repositioning oneself and linked widgets
444450 - linked widgets may even be other splitters, spacers (with their linked widgets ),..
445451
446452 Properties:
447453
448454 - color
449455 = see {any_widget.color}
450456
451457 - cursor
452458 = see {any_widget.cursor}
453459
454460 - enabled
455461 = "false" stops user interaction
456462
457463 - face
458464 = see {any_face}
459465
460466 - frame
461467 = see {any_frame}
462468
463469 - colorgrip
464470 = color of grip hatching
465471
466472 - grip
467473 = defines hatching pattern of the grip
468474
469475 * stb_dens(N) : the pattern is of rhombuses, the painted rhombs occupy "N" persents of the grip
470476
471477 * stb_block(N) : the pattern is of squares, painted & unpainted squares are equally sized and
472478 both have "N" pixels sides
473479
474480 * stb_hatchup(N) : the pattern is of right-tilted lines of 1 pixel width,
475481 each "N"-th pixel forms these lines
476482
477483 * stb_hatchdown(N) : the pattern is of left-tilted lines of 1 pixel width,
478484 each "N"-th pixel forms these lines
479485
480486 * stb_crosshatch(N) : the pattern is of crossing (left & right) tilted lines of 1 pixel width,
481487 each "N"-th pixel forms these lines
482488
483489 - linkbottom/linkleft/linkright/linktop
484490 = see {tspacer.*}
485491
486492 - options
487493
488494 = spo_hmove
489495 * "true" allows the spliter to move horizontally
490496
491497 = spo_hprop
492498 * "true" : keep the left position proportional ( on the ratio of creation time )
493499 to weigth of the client area of parent
494500
495501 = spo_hsizeprop
496502 * "true" : keep width of the spacer proportional ( on the ratio of creation time )
497503 to weigth of the client area of parent
498504 * the width stops shrinking on one set in design time
499505
500506 = spo_vmove
501507 * "true" allows the spliter to move vertically
502508
503509 = spo_vprop
504510 * "true" : keep the top position proportional ( on the ratio of creation time )
505511 to height of the client area of parent
506512
507513 = spo_vsizeprop
508514 * "true" : keep height of the spacer proportional ( on the ratio of creation time )
509515 to height of the client area of parent
510516 * the height stops shrinking on one set in design time
511517
512518 = spo_dockleft
513519 * causes the "linkleft" widget to dock to the left border of splitter
514520 * make sence only if linkleft "widget.bounds_x" less than "splitter.bounds_x"
515521
516522 = spo_docktop
517523 * causes the "linktop" widget to dock to the top border of splitter
518524 * make sence only if linktop "widget.bounds_y" less than "splitter.bounds_y"
519525
520526 = spo_dockright
521527 * causes the "linkright" widget to dock to the right border of splitter
522528 * make sence only if linkright "widget.(bounds_x+bounds_cx)" more than "splitter.(bounds_x+bounds_cx)"
523529
524530 = spo_dockbottom
525531 * causes the "linkbottom" widget to dock to the bottom border of splitter
526532 * make sence only if linkbottom "widget.(bounds_y+bounds_cy)" more than "splitter.(bounds_y+bounds_cy)"
527533
528534 !!! Two special cases :
529535
530536 1. (spo_dockleft = spo_dockright = TRUE) && (linkleft = linkright = the_same_widget) :
531537 causes the "linkleft" widget to adjust to h-positiion & width of the splitter,
532538 it's even possible that the widget doesn't touch the splitter
533539
534540 (spo_docktop = spo_dockbottom = TRUE) && (linktop = linkbottom = the_same_widget) :
535541 causes the "linktop" widget to adjust to v-position & height of the splitter,
536542
537543 It's even possible in these cases that the widget doesn't touch the splitter
538544
539545 - optionsscale
540546 = see {tscalingwidget.optionsscale}
541547
542548 - optionswidget
543549 = see {anywidget.optionswidget}
544550
545551 - onactivate, onchildscaled, ondeactivate, ondefocus, onenter, onexit, onfocus,
546552 onfontheightdelta, onmove, onpopup, onresize, onshowhint
547553 = see "tspacer"
548554
549555 - onupdatelayout
550556 fires :
551557
552558 = on creating the splitter
553559 = on any reposition of the linked widgets
554560 ( due to moving the splitter, resizing the parent,.. )
555561
556562### TSpacer
557563
558-`* a regular widget which creates a kind of positional link between surrounding widgets`\
559-`* designed to maintain distances between widgets`\
560-`* may have GUI look, caption etc switched off by default`\
561-`* resizing a spacer repositions its linked widgets`
564+```text
565+* a regular widget which creates a kind of positional link between surrounding widgets
566+* designed to maintain distances between widgets
567+* may have GUI look, caption etc switched off by default
568+* resizing a spacer repositions its linked widgets
569+```
562570
563571Properties:
564572
565573`   - anchors`\
566574`       = see {any_widget.anchors}`
567575
568576`   - bounds`\
569577`       = see {any_widget.bounds}`
570578
571579`   - color`\
572580`       = see {any_widget.color}`
573581
574582`   - enabled`\
575583`       = "false" turns color of the caption to gray`
576584
577585`   - visible`\
578586`       = "true" allows displayable settings (caption text, face, frame etc) to take `\
579587`       effect in run-time as well`\
580588`       `\
581589`   - <face>`\
582590`       = see {any face}`
583591
584592`   - <frame>`\
585593`       = see {any frame}`
586594
587595`   - linkbottom`\
588596`       = widget linked down to most outer edge (incl. frame[.caption]) of the spacer`\
589597`   - linkleft`\
590598`       = widget linked left to most outer edge of the spacer`\
591599`   - linkright`\
592600`       = widget linked right to most outer edge of the spacer`\
593601`   - linktop`\
594602`       = widget linked up to most outer edge of the spacer`
595603
596604`   - dist_bottom, dist_left, dist_right, dist_top :`\
597605`       = margins between most outer edge the spacer `\
598606`       and the corresponding linked widget`
599607
600608`   - options :`
601609
602610`       = spao_glueright`
603611
604612`             - if "false" `
605613
606614`                h-repositioning or h-resizing the linkleft widget shifts `\
607615`               the whole linked construction, it becomes the only way to h-shift`
608616
609617`                if {an_right IN linkright_widget.anchors} then the spacer `\
610618`               may be right-resized with auto h-resizing the linkright widget `\
611619`               so that the right margin of that widget is kept`
612620
613621`                if NOT {an_right IN linkright_widget.anchors} then the spacer `\
614622`               may be right-resized with auto h-shifting the linkright widget `\
615623`               so that width of that widget is kept`
616624
617625`           - if "true" `
618626
619627`                h-repositioning or h-resizing the linkright widget shifts `\
620628`               the whole linked construction, it becomes the only way to h-shift`
621629
622630`                if {an_left IN linkleft_widget.anchors} then the spacer `\
623631`               may be h-resized with auto h-resizing the linkleft widget `\
624632`               so that the left margin of that widget is kept`
625633
626634`                if NOT {an_left IN linkleft_widget.anchors} then the spacer `\
627635`               may be h-resized with auto h-shifting the linkleft widget `\
628636`               so that width of that widget is kept`
629637
630638`       = spao_gluebottom`
631639
632640`           - if "false" `
633641
634642`                v-repositioning or v-resizing the linktop widget shifts `\
635643`               the whole linked construction, it becomes the only way to v-shift`
636644
637645`                if {an_bottom IN linkbottom_widget.anchors} then the spacer `\
638646`               may be v-resized with auto v-resizing the linkbottom widget `\
639647`               so that the bottom margin of that widget is kept`
640648
641649`                if NOT {an_bottom IN linkbottom_widget.anchors} then the spacer `\
642650`               may be v-resized with auto v-shifting the linkbottom widget `\
643651`               so that height of that widget is kept`
644652
645653`           -  if "true" `
646654
647655`                   v-repositioning or v-resizing the linkbottom widget shifts `\
648656`               the whole linked construction, it becomes the only way to v-shift`
649657
650658`                if {an_top IN linktop_widget.anchors} then the spacer `\
651659`               may be v-resized with auto v-resizing the linktop widget `\
652660`               so that the top margin of that widget is kept`
653661
654662`                if NOT {an_top IN linktop_widget.anchors} then the spacer `\
655663`               may be v-resized with auto v-shifting the linktop widget `\
656664`               so that height of that widget is kept`
657665
658666`   - optionsscale`\
659667`       = see {tscalingwidget.optionsscale}`
660668
661669`   - optionswidget`\
662670`       = see {anywidget.optionswidget}`
663671
664672`   - onactivate, onchildscaled, ondeactivate, ondefocus, onenter, onexit, onfocus,`\
665673`     onfontheightdelta, onpopup, onresize, onshowhint `\
666674`       = see {any_widget.*}`
667675
668676`   - onmove`\
669677`       = see {any_window.OnMove}`
670678
671679`    any "link*" option set disables the spacer to reposition solely, `\
672680`       repositioning is only controlled by a "glued" widget since then`
673681
674682### TLayouter
675683
676684- a tspacer descendant designed to (auto)resize or/and move its contained widgets acc to some size/positon dependencies
677685- may have GUI look, frame caption etc switched off by default
678686- layouters may be nested to achieve complex layouts
679687
680688Each layout change/assignment is divided into performing 3 consequent stages :
681689
682690#### Stage 1
683691
684692Widgets auto resized using the following options:
685693
686694 - if {lao_placex OR lao_placey} :
687695
688696 = if {plo_scalesize in optionslayout} then
689697 * widgets with "osk_nopropwith" unset in their "optionsskin" are h-scaled
690698 in the proportion of change of tlayouter's clientwidth
691699 * widgets with "osk_nopropheight" unset in their "optionsskin" are v-scaled
692700 in the proportion of change of tlayouter's clientheight
693701
694702 For h-resized layouter, the effect looks like :
695703
696704 |--Widget__1---Widget__2--| => the initial look
697705
698706 |--Widget_1--Widget_2--| => the layouter gets narrower
699707
700708 |---Widget___1---Widget___2---| => the layouter gets wider
701709
702710 *** both widget sizes & margins are affected ***
703711 *** Widget_N may generally situate on different y-levels ***
704712
705713 otherwise :
706714
707715 = if lao_scalewidth in optionslayout :
708716 * widgets with "osk_nopropwith" unset in their "optionsskin" enters in the mode
709717 ( not applied until the layouter resizes! ) when they are h-scaled in the proportion
710718 as far as clientwidth of the tlayouter changes, then stages 2 & 3 are reapplied
711719
712720 For h-resized layouter, the effect looks like :
713721
714722 |--Single____widget????| => the initial look
715723
716724 |--Single__widget???| => the layouter gets narrower
717725
718726 |--Single_______widget?????| => the layouter gets wider
719727
720728 * also, if {lao_scaleleft in optionslayout} then left margins of the widgets
721729 with unset "optionsskin.osk_nopropleft" resize too otherwise retain
722730
723731 = if lao_scaleheight in optionslayout :
724732 * widgets with "osk_nopropheight" unset in their "optionsskin" enters in the mode
725733 ( not applied until the layouter resizes! ) when they are v-scaled in the proportion
726734 as far as clientheight of the tlayouter changes, then stages 2 & 3 are reapplied
727735
728736 * also, if {lao_scaletop in optionslayout} then top margins of the widgets
729737 with unset "optionsskin.osk_noproptop" resize too otherwise retain
730738
731739 *** only widget sizes & margins not distances between them are affected ***
732740
733741#### Stage 2
734742
735743Widgets may be auto resized in 5 consequent steps using the following options:
736744
737745 1. if plo_syncmaxautosize in place_options :
738746 = all widgets are autosized then their client areas are synchronised to the
739747 clientareas of the highest and the widest of the widget
740748 * calls "msegui.syncmaxautosize"
741749
742750 2. if plo_syncpaintwidth in place_options :
743751 = the paintwidths of all widgets are synchronized to the widget with the
744752 widest outer frame width ( ex. width of "frame.caption" )
745753 * mainly makes sense if "lao_alignx" set and {align_glue = wam_start or wam_end}
746754 ( see below ) when the widgets will be adjusted in order to fit into the
747755 inner client width of tlayouter:
748756
749757 x-align level
750758 V
751759 +----------------------------------+
752760 | Widget_1 the_widest_frame_caption|
753761 | Widget_2 frame_caption2 |
754762 | Widget_N wider_frame_captionN |
755763 +----------------------------------+
756764
757765 here, the effect is shown for "cp_right" frame captions
758766 // otherwise syncronizes to the outer ( of the frame except its caption ) width
759767 // of the Z-top widget
760768 * calls "msegui.syncpaintwidth"
761769 * paintwidth is the outer width
762770
763771 3. if plo_syncpaintheight in place_options :
764772 = the paintheights of all widgets are synchronized to the widget with the
765773 highest outer frame width ( ex. width of "frame.caption" ).
766774 * mainly makes sense if lao_aligny set and {align_glue = wam_start or wam_end}
767775 ( see below ) the widgets will be adjusted in order to fit into the inner
768776 client height of tlayouter :
769777
770778 +------------------------------+
771779 | The_ |
772780 | tallest_ taller_ |
773781 | frame_ frame_ frame_ |
774782 | caption caption2 captionN |
775783 | |
776784 | Widget1 Widget_2 Widget_N |<== y-align level
777785 +------------------------------+
778786
779787 here, the effect is shown for "cp_topleft" frame captions
780788 // otherwise syncronizes to the outer ( of the frame except its caption )
781789 // height of the Z-top widget
782790 * calls "msegui.syncpaintheight"
783791
784792 4. plo_synccaptiondistx in place_options :
785793 = causes all widgets to have the widest common room for their cp_(left/right)* frame captions
786794 * calls "msegui.synccaptiondistx"
787795
788796 5. plo_synccaptiondisty in place_options :
789797 = causes all widgets to have the highest common room for their cp_(top/bottom)* frame captions
790798 * calls "msegui.synccaptiondisty"
791799
792800#### Stage 3
793801
794802The widgets may be (re)arranged within the layouter.
795803
796804 There're 2 modes of such (re)arrangement which can be partially (orthogonally)
797805 combined (see later):
798806
799807 1) The place(ment) mode ( lao_place* in optionslayout ) :
800808
801809 - widgets are placed at some distances between each other, possibly with some
802810 margins, rooms of invisible widgets ( having visible=false) are also allocated
803811 unless "plo_noinvisible in place_options"
804812
805813 * the widgets are placed in the order of decreasing their "widgetrect.x"
806814 coordinates before alignment
807815
808816 * the inter-widget distances and the side margins ( if apllied ) in both
809817 dimentions are identical and limited between "place_mindist" and
810818 "place_maxdist"
811819
812820 = if {lao_placex in optionslayout} and {place_mode <> wam_none} then the
813821 following relevant settings apply:
814822
815823 * non-limiting value of "place_maxdist" :
816824
817825 # |Widget_1------Widget_2------Widget_3|
818826
819827 * non-limiting value of "place_maxdist" and {plo_propmargin in place_options} :
820828
821829 # |---Widget_1---Widget_2---Widget_3---|
822830
823831 * limiting value of "place_maxdist" and {place_mode = wam_start} :
824832
825833 # |Widget_1----Widget_2----Widget_3????|
826834
827835 * limiting value of "place_maxdist" and {place_mode = wam_start} and
828836 {plo_propmargin in place_options} :
829837
830838 # |---Widget_1---Widget_2---Widget_3???|
831839
832840 * limiting value of "place_maxdist" and {place_mode = wam_end} :
833841
834842 # |??????Widget_1---Widget_2---Widget_3|
835843
836844 * limiting value of "place_maxdist" and {place_mode = wam_end} and
837845 {plo_propmargin in place_options} :
838846
839847 # |???Widget_1---Widget_2---Widget_3---|
840848
841849 * limiting value of "place_maxdist" and {place_mode = wam_center} :
842850
843851 # |???Widget_1---Widget_2---Widget_3???|
844852
845853 * limiting value of "place_maxdist" and {plo_endmargin in place_options} :
846854
847855 # |Widget_1----Widget_2----Widget_____3|, or
848856
849857 # |Widget_1----Widget_____2----Widget_3|, or
850858
851859 # |Widget_____1----Widget_2----Widget_3|, here, the most left amongst
852860 widgets having both [an_left,an_right] set is expanded otherwise the most
853861 right widget ( Widget_3 in the example )
854862
855863 * limiting value of "place_maxdist" and {place_mode = wam_end} and
856864 {plo_propmargin in place_options} and {plo_endmargin in place_options} :
857865
858866 # |--Widget_1--Widget_____2--Widget_3--|,
859867
860868 The Legend:
861869 ===========
862870 limiting value of "place_maxdist" : such value which produce some visual
863871 effect on the layouter
864872
865873 "----" : distance ( = number of minuses, limited by place_maxdis )
866874 "????" : some remaining space ( = number of questmarks )
867875 "Widget_1" : widget of the original size
868876 "Widget__..__1" : (auto)resized widget
869877
870878 = if {lao_placey in optionslayout} and {place_mode <> wam_none} then the things
871879 are handled in the same manner as with "lao_placex" but for the vertical
872880 "top2bottom" direction of placement instead of the horizontal "left2right" one.
873881
874882 2) the align(ment) mode ( optionslayout.lao_align* ) :
875883
876884 - widgets are gathered into a visual group to a dedicated "leader" widget of
877885 the layout ( set by "align_leader" and defaults to the lowest in
878886 Z-Order = twidget.widgets[0] ) the leader stays in place while the others :
879887
880888 = if lao_alignx in optionslayout ( the hor alignment mode ):
881889 * if align_mode = wam_start :
882890 snap their left borders to the left border of leader
883891 * else if align_mode = wam_end :
884892 snap their right borders to the right border of leader
885893 * else if align_mode = wam_center :
886894 snap their v-axes to the v-axis of leader after that,
887895 = if lao_aligny in optionslayout ( the vert alignment mode ):
888896 * if align_mode = wam_start :
889897 snap their top borders to the top border of leader
890898 * else if align_mode = wam_end :
891899 snap their bottom borders to the bottom border of leader
892900 * else if align_mode = wam_center :
893901 snap their h-axes to the h-axis of leader
894902
895903 - after that, the whole widget group can be aligned within the layouter:
896904
897905 = if align_glue = wam_start
898906 * if lao_alignx in optionslayout:
899907 the left extent of group snaps to the left border of layouter
900908 * if lao_aligny in optionslayout:
901909 the top extent of group snaps to the top border of layouter
902910 = else if align_glue = wam_end
903911 * if lao_alignx in optionslayout:
904912 the right extent of group snaps to the right border of layouter
905913 * if lao_aligny in optionslayout:
906914 the bottom extent of group snaps to the bottom border of layouter
907915 = else if align_glue = wam_center
908916 * if lao_alignx in optionslayout:
909917 the v-axis of group snaps to the v-axis of layouter
910918 * if lao_aligny in optionslayout:
911919 the h-axis of group snaps to the h-axis of layouter
912920
913921 Mutually exclusive settings:
914922 * only one of "align_mode" can be choosen
915923 * only one of "glue_mode" can be choosen
916924 * "optionslayout.lao_alignx" & "optionslayout.lao_placex"
917925 * "optionslayout.lao_aligny" & "optionslayout.lao_placey"
918926
919927 V-alignment ( optionslayout.lao_aligny ) may be combined with h-placement
920928 ( optionslayout.lao_placex ), and h-alignment ( optionslayout.lao_alignx ) may
921929 be combined with v-placement ( optionslayout.lao_placey )
922930
923931 NOTE:
924932 The effects of the above described { resizing / placement / alignment } are
925933 irreversible. So, the only way to revert is to set "wan_none" then to revert
926934 manually.
927935
928936### TListView
929937
930938### TImage
931939
932940 <any image>
933941
934942 *** Note that switch to the monochrome mode is irerreversible ! ***
935943
936944 alignment:
937945
938946 By default, images are top-left aligned, with the original size preserved.
939947
940948 al_xcentered = centers the image horizontally
941949 al_ycentered = centers the image vertically
942950
943951 al_right = docks the image to the right border of placeholder
944952 al_bottom = docks the image to the bottom border of placeholder
945953
946954 al_grayed = fills non-transparent areas with the selected color
947955
948956 al_stretchx = adjusts size so that to fill the placeholder in width
949957 al_stretchy = adjusts size so that to fill the placeholder in height
950958 al_fit = adjusts size so that to fill the placeholder in both width & height
951959
952960 al_tiled = spawns the image & tile the whole placeholder with the copies
953961
954962 Interpolation mode while stretching
955963
956964 al_intpol = antialiases as far as the size changes
957965 (the only working in Linux)
958966 al_or = interpolation pixel operation is "or" -> 1's are extended
959967 al_and = interpolation pixel operation is "and" -> 0's are extended
960968 ( al_or and al_and only on win32, mainly useful for stretching of monochrome bitmaps) :
961969
962970 colorbackground = color of image transparent ( masked ) areas in monochrome
963971 non-masked mode
964972 colorforeground = color of non-transparent areas in monochrome mode
965973
966974 options:
967975
968976 bmo_monochrome = fills non-transparent areas with "colorforeground",
969977 also, in non-masked mode, fills transparent areas
970978 with "colorbackground"
971979
972980 bmo_masked = activates built-in image transparency {it "hides" transparent (masked) areas}
973981 bmo_colormask = applies faded edge transparency on the color masked areas in the image
974982
975983 transparency = makes the image transparent as long as enlights areas behind
976984 the image with the selected color
977985
978986 transparentcolor = for a non-masked image, assigns a color indicate transparency areas
979987 ( on matching areas, the image will be seen through )
980988
981989### TDial
982990
983991### TChart
984992
985993There are demos here:
986994
987995<https://github.com/mse-org/mseuniverse/tree/master/attic/msedocumenting/mse/trunk/help/tutorials/widgets/charts>
988996
989997### TChartRecorder
990998
991999### TPolygon
9921000
9931001### TPickWidget
9941002
9951003### TOpenglWidget
9961004
9971005## Edit
9981006
9991007### TStringEdit
10001008
10011009### TMemoEdit
10021010
10031011### THexStringEdit
10041012
10051013### TDropdownListEdit
10061014
1007-`A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:`\
1008-`- deo_autodropdown dropdown on keypress`\
1009-`- deo_selectonly don't allow entering arbitrary text.`\
1010-`- deo_forceselect don't allow entering empty text.`
1015+```text
1016+A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:
1017+- deo_autodropdown dropdown on keypress
1018+- deo_selectonly don't allow entering arbitrary text.
1019+- deo_forceselect don't allow entering empty text.
1020+```
10111021
10121022### THistoryEdit
10131023
1014-`A tstringedit which shows the previously entered values in a dropdownlist for selection.`
1024+```text
1025+A tstringedit which shows the previously entered values in a dropdownlist for selection.
1026+```
10151027
10161028### TIntegerEdit
10171029
10181030### TKeyStringEdit
10191031
1020-`Maps string to string.`
1032+```text
1033+Maps string to string.
1034+```
10211035
10221036### TEnumEdit
10231037
1024-`Maps integer to string, zero based and sequencial (first item 0, next 1, ...).`
1038+```text
1039+Maps integer to string, zero based and sequencial (first item 0, next 1, ...).
1040+```
10251041
10261042### TEnumTypeEdit
10271043
10281044A TEnumEdit which maps Pascal enums to their names. Use OnInit event to store the typeinfo pointer of the enum type into **sender.typeinfopo**.
10291045
10301046``` pascal
10311047
10321048procedure tmainfo.enumtypeeditinit(const sender: tenumtypeedit);
10331049begin
10341050 sender.typeinfopo := PTypeInfo(TypeInfo(TMyEnumeratedType));
10351051end;
10361052```
10371053
10381054### TSelector
10391055
10401056TSelector is the most specialized widget of the dropdown editwidget group, it is based on tenumedit (tenumedit maps an integer to a string) and uses for the dropdownlist a second map which must be created on the fly in ongetdropdowninfo. An example is tcommselector where the enumedit maps commnrty to commname and the dropdownlist shows the available RS232 ports only.
10411057
10421058### TRealEdit
10431059
10441060### TRealSpinEdit
10451061
10461062### TDateTimeEdit
10471063
10481064### TCalendarDateTimeEdit
10491065
10501066### TEdit
10511067
10521068MSEgui counterpart of Delphi TEdit. You will never use it.
10531069
10541070### TWidgetGrid
10551071
10561072### TItemEdit
10571073
10581074### TDropDownItemEdit
10591075
1060-`A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:`\
1061-`- deo_autodropdown dropdown on keypress`\
1062-`- deo_selectonly don't allow entering arbitrary text.`\
1063-`- deo_forceselect don't allow entering empty text.`
1076+```text
1077+A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:
1078+- deo_autodropdown dropdown on keypress
1079+- deo_selectonly don't allow entering arbitrary text.
1080+- deo_forceselect don't allow entering empty text.
1081+```
10641082
10651083### TMBDropDownItemEdit
10661084
10671085### TTreeItemEdit
10681086
10691087### TRecordFieldEdit
10701088
1071-`Used in twidgetgrid in order to edit fields of a ttreeitemedit. Example is MSEide projecttreeform.pas.`
1089+```text
1090+Used in twidgetgrid in order to edit fields of a ttreeitemedit. Example is MSEide projecttreeform.pas.
1091+```
10721092
10731093### TDialogStringEdit
10741094
10751095A tstringedit with an ellipse button. Use "onexecute" to show the dialog.
10761096
10771097### TPointerEdit
10781098
10791099### TSlider
10801100
10811101### TProgressBar
10821102
10831103### TBooleanEdit
10841104
10851105### TBooleanEditRadio
10861106
10871107### TDataButton
10881108
10891109A button with an integer value. Clicking increments the value until "max", then it restarts with "min". Can be inserted into a twidgetgrid. The current value selects the showed image and face by the items of "imagenums" and "valuefaces".
10901110
10911111### TStockGlyphDataButton
10921112
10931113### TDataIcon
10941114
10951115Shows an imagelist item by lookup from "value" to "imagenums". Clicking increments value until "max" then it restarts with "min". Can be inserted into a twidgetgrid.
10961116
10971117### TTextEdit
10981118
10991119Only useful if inserted into a twidgetgrid, builds a text editor, used in MSEide source editor.
11001120
11011121### TDataImage
11021122
11031123A pixmap display widget which can be inserted into twidgetgrid.
11041124
11051125### TTerminal
11061126
11071127Only useful if inserted into a twidgetgrid, builds a very simple terminal emulator. Used in MSEide target console.
11081128
11091129## NoGui
11101130
11111131### TAction
11121132
11131133 Shortcut processing order :
11141134
11151135 - the smallest piece of processing is "doshortcut" procedure which
11161136 is called until processed:
11171137 = starting from the sender up to the toplevel widget
11181138 = then by all child widgets with non-set "ow_noparentshortcut"
11191139 = then, if "ow_nochildshortcut" isn't set, by the parent widget
11201140 = then by the widget oneself
11211141
11221142 - "doshortcut" is checked in the following order:
11231143 = starting from form's main menu
11241144 = then from the owning window ( the widget oneself )
11251145 = then from the application
11261146
11271147 *** A shortcut is bound to a widget by :
11281148 - placing an action component on the widget ***
11291149 - direct assigning the shortcut to the widget (menus,..)
11301150 ---------------------------
11311151
11321152 caption, color, colorglyph, helpcontext, hint, imagecheckedoffset,
11331153 imagelist <see "timagelist">, imagenr, imagenrdisabled
11341154
11351155 - sets look of "clients" (buttons, menu/toolbar items,..), unless
11361156 these clients have "state.as_local*" set :
11371157
11381158 *** For meaning of these options, see help on the "client" widgets ***
11391159
11401160 group
11411161 - default value for one-named property of the bound widgets
11421162 ( menu items,... )
11431163
11441164 options :
11451165 ao_updateonidle
11461166 - runs this action in cycle, waiting for no gui events everytime
11471167
11481168 ao_globalshortcut
11491169 - allows the action to trigger on a non-main form
11501170 (the shortcut is triggered whatever form of the applicatin it was pressed on,
11511171 otherwise only when the form where the aption is placed on is focused )
11521172
11531173 ao_nocandefocus
11541174 - causes the action not to call "CanDefocus" for focused edit widget of active form
11551175 before executing own code
11561176 ( it helps to avoid the effect of cancelling changes in these widgets
11571177 on activating the bound shortcut )
11581178
11591179 shortcut
11601180 - keyboard combination triggering the action
11611181
11621182 shortcut
11631183 - alternative "shortcut" and handled identically
11641184
11651185 state :
11661186
11671187 as_disabled
11681188 - prevents the action from triggering, also puts the bound widgets to "disabled" look
11691189
11701190 as_invisible
11711191 - in run-time, hides the bound widget, still reacting on the shortcut or direct call
11721192
11731193 as_checked
11741194 - selects the bound menu item if it has "mao_checkbox" option set
11751195
11761196 as_default
11771197 as_local*
11781198
11791199 statfile
11801200 <see "tstatfile">
11811201
11821202 stavarname
11831203
11841204
11851205 tagaction
11861206 onasyncevent
11871207 onchange
11881208 onexecute
11891209 onupdate
11901210
11911211### TActivator
11921212
11931213### TCustomLookupbuffer
11941214
11951215 - provides a group of parallel arrays of float(=datetime), integer and widestring types,
11961216 and facilities to :
11971217 = search in any array
11981218 = on found position, quickly obtain corresponding value in another array
11991219 - for each type, several arrays may be kept
12001220 - each array is integer-indexed, even string ones ( case[in]sensitive )
12011221 - uses two way of accessing arrays data, through :
12021222 = physic : array storage index ( row number ) directly
12031223 = logical : the integer index ( see above ):
12041224 first, physic row number is known for the logical index then the data
12051225 are accessed with the found number
12061226
12071227 *** logical index values are built automatically based on array values,
12081228 on updating its data ***
12091229 - dont' have interface to load data ( see its descendants for that )
12101230
12111231 fieldcountfloat - number of float arrays
12121232 fieldcountinteger - number of integer arrays
12131233 fieldcounttext - number of widestring arrays
12141234
12151235 Event handlers:
12161236 - onchange
12171237
12181238 Public interface:
12191239
12201240 procedure beginupdate; - marks beginning of "update"
12211241 procedure endupdate; - if all "update" finished, fires "onchange" event
12221242 procedure clearbuffer; - clears all arrays then fires "onchange"
12231243
12241244 procedure checkbuffer;
12251245 - [re]loads the arrays with most actual data
12261246 - just a stub here since doesn't have a data source
12271247
12281248 function find(const fieldno: integer; const avalue: integer/realty/msestring;
12291249 out aindex: integer; const filter: lbfiltereventty = nil): boolean;
12301250 - applies external filtering ("filter" procedure) then incrementally searches integer/realty(datetime) array "fieldno"
12311251 for value "avalue" starting from logical index "aindex", returns "true" and the updated logical index
12321252 if found else next bigger;
12331253
12341254 function find(const fieldno: integer; const avalue: msestring;
12351255 out aindex: integer;
12361256 const caseinsensitive: boolean;
12371257 const filter: lbfiltereventty = nil): boolean; overload;
12381258 - applies external filtering ("filter" procedure) then incrementally searches widestring array "fieldno" for value "avalue",
12391259 in "caseinsensitive" manner, starting from logical index "aindex", returns "true" and the updated logical index
12401260 if found else next bigger;
12411261
12421262 function findphys(const fieldno: integer; const avalue: integer;
12431263 out aindex: integer; const filter: lbfiltereventty = nil): boolean; overload;
12441264 - applies external filtering ("filter" procedure) then incrementally searches integer/realty(datetime) array "fieldno"
12451265 for value "avalue" starting from row number "aindex", returns "true" and the updated row number
12461266 if found else next bigger;
12471267
12481268 function findphys(const fieldno: integer; const avalue: msestring; out aindex: integer; const caseinsensitive: boolean;
12491269 const filter: lbfiltereventty = nil): boolean; overload;
12501270 - applies external filtering ("filter" procedure) then incrementally searches widestring array "fieldno" for value "avalue",
12511271 in "caseinsensitive" manner, starting from row number "aindex", returns "true" and the updated row number
12521272 if found else next bigger;
12531273
12541274 The external filtering ("filter") procedure takes the arguments of the caller
12551275 togehther with physical row number found in the caller which allows
12561276 to check several values at once for that number, within the filter
12571277
12581278 function integervaluephys(const fieldno,aindex: integer): integer;
12591279 - returns value of integer array "fieldno" at row number "aindex"
12601280
12611281 function integervaluelog(const fieldno,aindex: integer): integer;
12621282 - returns value of integer array "fieldno" where the array index equals to "aindex"
12631283
12641284 function integerindex(const fieldno,aindex: integer): integer;
12651285 - returns row number of integer array "fieldno" where the array index equals to "aindex"
12661286
12671287 function integerindexar(const fieldno: integer): integerarty;
12681288 - returns all bunch of indexes of integer array "fiedlno"
12691289
12701290 function integerar(const fieldno: integer): integerarty;
12711291 - returns all bunch of data of integer array "fiedlno"
12721292
12731293 function floatvaluephys(const fieldno,aindex: integer): realty;
12741294 - returns value of real/datetime array "fieldno" at row number "aindex"
12751295
12761296 function floatvaluelog(const fieldno,aindex: integer): realty;
12771297 - returns value of real/datetime array "fieldno" where the array index equals to "aindex"
12781298
12791299 function floatindex(const fieldno,aindex: integer): integer;
12801300 - returns row number of real/datetime array "fieldno" where the array index equals to "aindex"
12811301
12821302 function floatindexar(const fieldno: integer): integerarty;
12831303 - returns all bunch of indexes of real/datetime array "fiedlno"
12841304
12851305 function floatar(const fieldno: integer): realarty;
12861306 - returns all bunch of data of real/datetime array "fiedlno"
12871307
12881308 function textvaluephys(const fieldno,aindex: integer): msestring;
12891309 - returns value of widestring array "fieldno" at row number "aindex"
12901310
12911311 function textvaluelog(const fieldno,aindex: integer;
12921312 const caseinsensitive: boolean): msestring;
12931313 - returns value of widestring array "fieldno" where the array index equals to "aindex"
12941314
12951315 function textindex(const fieldno,aindex: integer;
12961316 const caseinsensitive: boolean): integer;
12971317 - returns row number of widestring array "fieldno" where the array index equals to "aindex"
12981318
12991319 function textindexar(const fieldno: integer;
13001320 const caseinsensitive: boolean): integerarty;
13011321 - returns all bunch of indexes of widestring array "fiedlno"
13021322
13031323 function textar(const fieldno: integer): msestringarty;
13041324 - returns all bunch of data of widestring array "fiedlno"
13051325
13061326
13071327 function lookupinteger(const integerkeyfieldno,integerfieldno,
13081328 keyvalue: integer): integer; overload;
13091329 - returns value of integer array "integerfieldno" at position where
13101330 value of parallel integer array "integerkeyfieldno" equals to "keyvalue"
13111331 ( 0 if not found )
13121332
13131333 function lookupinteger(const stringkeyfieldno,integerfieldno: integer;
13141334 const keyvalue: msestring): integer; overload;
13151335 - returns value of integer array "integerfieldno" at position where
13161336 value of parallel widestring array "stringkeyfieldno" equals to "keyvalue"
13171337 ( 0 if not found )
13181338
13191339 function lookuptext(const integerkeyfieldno,textfieldno,
13201340 keyvalue: integer): msestring; overload;
13211341 - returns value of integer array "textfieldno" at position where
13221342 value of parallel integer array "integerkeyfieldno" equals to "keyvalue"
13231343 ( '' if not found )
13241344
13251345 function lookuptext(const stringkeyfieldno,textfieldno: integer;
13261346 const keyvalue: msestring): msestring; overload;
13271347 - returns value of integer array "textfieldno" at position where
13281348 value of parallel integer array "integerkeyfieldno" equals to "keyvalue"
13291349 ( '' if not found )
13301350
13311351 function lookupfloat(const integerkeyfieldno,floatfieldno,
13321352 keyvalue: integer): realty; overload;
13331353 - returns value of real/datetime array "floatfieldno" at position where
13341354 value of parallel integer array "integerkeyfieldno" equals to "keyvalue"
13351355 ( emptyreal if not found )
13361356
13371357 function lookupfloat(const stringkeyfieldno,floatfieldno: integer;
13381358 keyvalue: msestring): realty; overload;
13391359
13401360 - returns value of real/datetime array "floatfieldno" at position where
13411361 value of parallel widestring array "stringkeyfieldno" equals to "keyvalue"
13421362 ( emptyreal if not found )
13431363
13441364 function count: integer; - returns number of data rows
13451365
13461366 property fieldcounttext: integer; - returns/sets number of widestring arrays
13471367 property fieldcountfloat: integer; - returns/sets number of real/datetime arrays
13481368 property fieldcountinteger: integer; - returns/sets number of integer arrays
13491369
13501370 the above "fieldcount*" props clear the buffer on setting a value
13511371
13521372 property integervalue[const fieldno,aindex: integer]: integer; - a shortcut to "integervaluephys"
13531373 property floatvalue[const fieldno,aindex: integer]: realty; - a shortcut to "floatvaluephys"
13541374 property textvalue[const fieldno,aindex: integer]: msestring; - a shortcut to "textvaluephys"
13551375
13561376 property onchange: notifyeventty;
13571377 - called in "changed" wich in turn is called in :
13581378 = clearbuffer
13591379 = endupdate
13601380 = doasyncevent
13611381 = loaded
13621382 = tlookupbuffer.addrow
13631383
13641384### TLookupBuffer
13651385
13661386 tlookupbuffer = class(tcustomlookupbuffer)
13671387
13681388 - extends "tcustomlookupbuffer" with methods of run-time data filling
13691389
13701390 - see <tcustomlookupbuffer>
13711391
13721392 += Extentions to the public interface:
13731393
13741394 procedure addrow(const integervalues: array of integer;
13751395 const textvalues: array of msestring;
13761396 const floatvalues: array of realty);
13771397
13781398 - adds one row to each of widestring arrays, integer arrays and real/datetime arrays,
13791399 array size of "{type}values" equals to number of {type} arrays
13801400
13811401 procedure addrows(const integervalues: array of integerarty;
13821402 const textvalues: array of msestringarty;
13831403 const floatvalues: array of realarty);
13841404
13851405 - adds many data rows to each of widestring arrays, integer arrays and real/datetime arrays,
13861406 only min length of the input data arrays are inserted, longer data are truncated
13871407 array size of "{type}values" equals to number of {type} arrays and the size of "{type}values[i]"
13881408 describes number od data elements in the array
13891409
13901410
13911411### TDBLookupBuffer
13921412
13931413 tdblookupbuffer = class(tcustomdblookupbuffer -> tcustomlookupbuffer)
13941414
13951415 - extends "tcustomlookupbuffer" with interface to fill arrays with DB-data
13961416 - see <tcustomlookupbuffer> & <tcustomdblookupbuffer>
13971417
13981418 Extentions to the public interface:
13991419
14001420 procedure checkbuffer; - if data obsolete ("invalid") then reloads them from "datasource"
14011421
14021422 property datasource: tdatasource; - sets/returns DB data source where to load data from
14031423 property textfields: tdbfieldnamearrayprop; - allows to assign a {datasource:datafield} to each of widestring arrays
14041424 property integerfields: tdbfieldnamearrayprop; - allows to assign a {datasource:datafield} to each of integer arrays
14051425 property floatfields: tdbfieldnamearrayprop; - allows to assign a {datasource:datafield} to each of real/datetime arrays
14061426
14071427 property optionsdb: lbdboptionsty; - tunes some DB behaviour apects
14081428 - olbdb_closedataset :
14091429 = once data obsolete, opens (if needed) the supplier dataset (disabling its bound controls)
14101430 then [re]loads data from it then closes it
14111431
14121432 - olbdb_invalidateifmodified :
14131433 = gets marked "invalid" once contents of the bound dataset change,
14141434 it signals to reload the buffer with the new data just before next accessing
14151435 ( for any purpose - searching, lookuping, getting value/(array of values),..)
14161436
14171437### TDBmemoLookupbuffer
14181438
14191439 - allows to use for lookup-ing any text-convertable DB-fields
14201440 - an analog of tdblookupbuffer, but :
14211441 - "integerfields" may be names of any integer-convertable DB-fields
14221442 - "floatfields" may be names of any (real/datetime)-convertable DB-fields
14231443 - "textfields" may be names of any text-presentable DB-fields
14241444
14251445 - each DB-field value ( presenting a memo generally of many lines ) may supply many data rows at once
14261446 to the bound array of the buffer, since this value will be internally splitted & turned into native array values,
14271447 and the resulting "count" (arrays row count) of the whole buffer will be the minimal rows count amongst arrays
14281448 of the buffer, the rest data are truncated
14291449
14301450 - when loading widestring arrays, also checks for & performs "utf8-to-widestring" conversion of values of
14311451 the bound DB-fields so that these arrays always store widestrings
14321452
14331453### TThreadComp
14341454
14351455### TStatFile
14361456
14371457 - so that to be in effect, it should also be assigned to the form where the widget using the stafile is placed on
14381458 - in design, if "onstatwrite" is set and "filedir" is not yet created, deactivate exception "ECreateError" in project settings ( "Debugger" tab )
14391459 - "filedir" may contain "~/" indicating the user's home directory
14401460 - options "oe_savestate" & "oe_savevalue" of "client" widgets define what to store to the file
14411461 - position etc changes or/and value changes
14421462 - in case when a main form shares its stafile with non-main forms, on creating non-main ones, just edited not saved data of the main form ( bound to vars of the statfile) are reset to values read from the statfile upon creating the form; for "sfo_memory", this effect absents unless widgets on the concurring forms share same variable[s]; to avoid this behaviour, disable "fo_autoreadstat" & "fo_autowritestat" of the non-main forms
14431463 - each "tstafile" owns:
14441464 = tstatwriter:
14451465 * provides methods of writing sections & statvars to a memory/file stream
14461466 - tstatreader:
14471467 * holds list of sections with statvars each
14481468 * provides search & check & reading interface to the statvars
14491469 * provides reading statvars from a memory/file stream
14501470
14511471 Positioning to a section speeds up accessing its statvars
14521472
14531473 - there also is "tstatfiler" ( exposed by some "tstatfile" events ) which:
14541474 = may present or "tstatwriter" or "tstatreader" ( there's a check method )
14551475 = provides directionless "update" methods with internal switch to needed direction of processing
14561476 - "reading" or "writing" statvars on per-section basis
14571477
14581478 activator :
14591479 <see tactivator> : NOT YET DONE
14601480
14611481 encoding = "en_utf8" selected here, allows to store non-Latin text in the file
14621482 filedir = directory where to keep the file ( by default - the current working directory )
14631483 filename = name of the file
14641484
14651485 options:
14661486 sfo_memory = reads & writes not from a disk file but from a named memory stream
14671487 ( there's an exclusion - see below "sfo_savedata" ),
14681488 mostly useful for presenting last used values on recalling
14691489 non-main forms etc ( data even survive recreating forms),
14701490 or even for data "exchange" between non-main modal( non-concurring ) forms
14711491 in case of the target widgets share same statvarnames
14721492
14731493 sfo_createpath = creates "filedir" if necessary
14741494 sfo_savedata = used only with "sfo_memory", commands to save
14751495 the memory data to the master statfile (see below)
14761496
14771497 sfo_activatorread = activator activate triggers reading ???
14781498 sfo_activatorwrite = activator deactivate triggers writing ???
14791499
14801500 statfile = a master statfile
14811501 statvarname = name of section of this file in the upper statfile
14821502 Tag = an integer property for misc purposes
14831503
14841504 Event handlers:
14851505 onstatafterread - fires on return from "readstat"
14861506 onstatafterwrite - fires on return from "writestat"
14871507 onstatbeforeread - fires on beginning of "readstat"
14881508 onstatbeforewrite - fires on beginning of "writestat"
14891509 onstatread = fires after reading state data
14901510 onstatwrite = fires after writing state data
14911511 onstatupdate = fires after reading/writing state data just before
14921512 "onstatread" & "onstatwrite"
14931513
14941514 Public methods:
14951515
14961516 procedure initnewcomponent(const ascale: real); override;
14971517 - does nothing but fixes the default file name as the statfile default
14981518
14991519 procedure readstat(stream: ttextstream = nil); overload;
15001520 - rereads all statvars of the stafile/memorystream
15011521
15021522 procedure readstat(const aname: msestring; const statreader: tstatreader); overload;
15031523 - rereads "aname" statvar of the statfile
15041524
15051525 procedure writestat(const stream: ttextstream = nil); overload;
15061526 - rewrites all statvars to the stafile/memorystream
15071527 (if neccessary, prepares to writting - creates "filedir", stafile,...)
15081528
15091529 procedure writestat(const aname: msestring; const statwriter: tstatwriter); overload;
15101530 - overwrites "aname" statvar of the statfile
15111531
15121532 procedure updatestat(const aname: msestring; const statfiler: tstatfiler);
15131533 - depending on kind of "statfiler" ( writer/reader ), writes/reads
15141534 the most up-to-date stat data
15151535
15161536### TTimer
15171537
15181538### TNoGuiAction
15191539
15201540### TPipeReadercomp
15211541
15221542### TSysEnvManager
15231543
15241544### TProcessMonitor
15251545
15261546### TFilechangeNotifier
15271547
15281548### TShortCutController
15291549
15301550### TPostscriptPrinter
15311551
15321552### TGdiPrinter
15331553
15341554### TWmfPrinter
15351555
15361556### TSkinController
15371557
15381558### TGuiThreadComp
15391559
15401560## Font
15411561
15421562See also : [[Reference: MSEgui/TFont]]
15431563
15441564### Any Font
15451565
15461566 charset { ANSI/ DEFAULT/ SYMBOL /SHIFTJIS /HANGEUL /GB2312 /CHINESEBIG5 /OEM
15471567 /JOHAB / HEBREW/ ARABIC/ GREEK/ TURKISH/ VIETNAMESE/ THAI/ EASTEUROPE/
15481568 RUSSIAN/ MAC/ BALTIC }
15491569 - changes the font to the nearest containing the selected encoding(charset)
15501570 - no font change made if the supplied encoding doesn't match any font
15511571 color
15521572 - color of the glyphs contours
15531573 colorbackground
15541574 - fill color of the glyph cells ( not including extraspace )
15551575 colorshadow
15561576 - color of SE glyph "edges" ( if not "cl_none", deactivates "colorbackground" )
15571577 extraspace
15581578 - v-space between glyph cells of adjacent text rows (negative values cause the cells to overlap )
15591579 height
15601580 - v-size of glyph cells, in pixels
15611581 name
15621582 - initially, font is choosen by { "family" = this name }
15631583 options:
15641584 foo_fixed
15651585 - changes the font to the nearest "mono" spaced (usually = Courier)
15661586 foo_proportional
15671587 - changes the font to the nearest "proportionally" spaced (usually = Helvetica)
15681588 foo_helvetica
15691589 - changes the font to the nearest in "sans" category (usually = Helvetica)
15701590 foo_roman
15711591 - changes the font to the nearest in "serif" category (usually = Times[ New Roman])
15721592 foo_script
15731593 - Win32 only, changes the font to the nearest in "script" category
15741594 foo_decorative
15751595 - Win32 only, changes the font to the nearest in "decorative" category
15761596 foo_antialiased
15771597 - Linux-only, enables antialiasing (if disabled by Xft globally)
15781598 foo_nonantialiased
15791599 - Linux-only, disables antialiasing (if enabled by Xft globally)
15801600 usually making glyph extents (not cells !) a bit wider
15811601 style:
15821602 fs_bold
15831603 - gives the font a "bold" look
15841604 fs_italic
15851605 - gives the font an "italic" look
15861606 fs_underline
15871607 - gives the font an "underlined" look
15881608 fs_strikeout
15891609 - gives the font a "striked out" look
15901610 fs_selected
15911611 - "TRUE" here combined with {tf_noselect:=FALSE}, causes the text described by this font
15921612 to be initially selected ( with the clipboard operations available ),
15931613 currently applicable only to richstrings
15941614
15951615 width
15961616 - 10*{ glyph cell width, average in pixels }, 0 = {font default}
15971617
15981618 xscale
15991619 - width ratio of each glyph {cell & contour}, the effect is similar to "width"
16001620
16011621 *** "foo_*" font selection overrides one made with "name"
16021622
16031623 *** if change with "foo_*" is unsuccessful then the nearest "sans" font is usually chosen
16041624
16051625 *** The categories :
16061626
16071627 sans => have no serifs and have strokes of even thickness
16081628 serif => have serifs at glyph contours and made up of strokes of varying thickness
16091629 script => resemble handwriting
16101630 decorative => flashy styles to be used sparingly in headlines or posters
16111631
16121632## GUI
16131633
16141634### TWindow
16151635
16161636 twindow = class(teventobject,icanvas)
16171637 public
16181638
16191639 // releases mouse, unlinks from the canvas, processes all pending events of the window
16201640 // if called from within main thread then destroys the window directly
16211641 // otherwise posts a window destroy event for oneself and waits for it to be processed
16221642 procedure destroywindow;
16231643
16241644 // registers the instance of onself in the "owner" widget, allocates the canvas,
16251645 // adds a reference to oneself,
16261646 // then prepares the "owner" hierarchy to be invalidated ( "owner.rootchanged" )
16271647 // since now, the window is allocated and belongs to the "aowner" widget
16281648 constructor create(aowner: twidget);
16291649
16301650 destructor destroy; override;
16311651
16321652 // adds "method" to the internal list of scroll dependants
16331653 procedure registeronscroll(const method: notifyeventty);
16341654
16351655 // removes "method" from the internal list of scroll dependants
16361656 procedure unregisteronscroll(const method: notifyeventty);
16371657
16381658 // releases mouse if captured, resets the cursor, then enters an event loop for the window,
16391659 // TRUE on return if the window is destroyed
16401660 function beginmodal: boolean;
16411661
16421662 * checks if the "sender" window is already modal to avoid circularity,
16431663 if not then starts an event loop for the "sender" where the "sender" is a receiver of GUI events,
16441664 once the loop is terminated reactivates the previously active window if it was,
16451665 TRUE if modalwindow destroyed
16461666
16471667 function tinternalapplication.beginmodal(const sender: twindow): boolean;
16481668
16491669 // removes the internal stuff which indicates the modal state
16501670 procedure endmodal;
16511671
16521672 // if the window is visible,
16531673 // deactivates the previously active window, shows the window (see below),
16541674 // if no active window in the app or the window or its Z-predecessor is modal and
16551675 // the app has no focused widget then prepares the bound widget to be focused,
16561676 // then addresses the WM to put the window to foreground
16571677 procedure activate;
16581678
16591679 // if the bound widget has visible=true then:
16601680 // - if NOT windowevent then :
16611681 // = address the WM to set size of the window acc to window opts
16621682 // wp_maximized, wp_fullscreen or normal size otherwise
16631683 // = if the window is normally sized, moves it to its default position is specified ( screen centered etc )
16641684 // - unhides/unminimizes the window if needed
16651685 // - shows other windows of the applications acc to state of the window group
16661686 // ( in normal size or minimized )
16671687
16681688 private
16691689 procedure twindow.show(windowevent: boolean);
16701690
16711691 // TRUE if this window currently grabs user input
16721692 ( a widget drawn within the window(=form) is in focus,.. )
16731693 function active: boolean;
16741694
16751695 // if the window was active then deactivates the window & remembers it as the previous active ( to restore leater if requested ),
16761696 // returns TRUE if that storage occurred
16771697 function deactivateintermediate: boolean;
16781698
16791699 // makes the window active & clears the above app reference to it ( "active before deactivating" )
16801700 procedure reactivate; //clears app.finactivewindow
16811701
16821702 // scans the app event queue for "ek_expose" event[s] addressed to the window,
16831703 // if found then redraws that part of the window which the event describes
16841704 // ( processed events are then deleted )
16851705 procedure update;
16861706
16871707 // TRUE if the window :
16881708 // 1) doesn't have an inner widget grabbing input focus
16891709 // or
16901710 // 2) has such widget, and this widget ( and all its descendants )
16911711 // pass "CanClose" check
16921712 //
16931713 // *** see also "twidget.CanClose" ***
16941714 //
16951715 function candefocus: boolean;
16961716
16971717 // tries to defocus the currently focused widget if it belongs to the window,
16981718 // if succeeds then executes code of virtual "DoDefocus" of the widget descessor
16991719 // ( this code defines behaviour & look of the widget on defocusing );
17001720 //
17011721 // no defocusing is done if the focused widget ( or its descendants )
17021722 // doesn't pass "CanClose" check
17031723 //
17041724 procedure nofocus;
17051725
17061726 // setfocusedwidget(widget)
17071727
17081728 property focuscount: cardinal read ffocuscount;
17091729 function close: boolean; //true if ok
17101730 procedure beginmoving; //lock window rect modification
17111731 procedure endmoving;
17121732 procedure bringtofront;
17131733 procedure sendtoback;
17141734 procedure stackunder(const predecessor: twindow);
17151735 //stacking is performed in mainloop idle, nil means top
17161736 procedure stackover(const predecessor: twindow);
17171737 //stacking is performed in mainloop idle, nil means bottom
17181738 function stackedunder: twindow; //nil if top
17191739 function stackedover: twindow; //nil if bottom
17201740 function hastransientfor: boolean;
17211741
17221742 procedure capturemouse;
17231743 procedure releasemouse;
17241744 procedure postkeyevent(const akey: keyty;
17251745 const ashiftstate: shiftstatesty = []; const release: boolean = false;
17261746 const achars: msestring = '');
17271747
17281748 function winid: winidty;
17291749 function haswinid: boolean;
17301750 function state: windowstatesty;
17311751 function visible: boolean;
17321752 function activating: boolean; //in internalactivate proc
17331753 function normalwindowrect: rectty;
17341754 property updateregion: regionty read fupdateregion;
17351755 function updaterect: rectty;
17361756
17371757 procedure registermovenotification(sender: iobjectlink);
17381758 procedure unregistermovenotification(sender: iobjectlink);
17391759
17401760 property options: windowoptionsty read foptions;
17411761
17421762 // widget
17431763 property owner: twidget read fowner;
17441764
17451765 property focusedwidget: twidget read ffocusedwidget;
17461766 property transientfor: twindow read ftransientfor;
17471767 property modalresult: modalresultty read fmodalresult write setmodalresult;
17481768 property buttonendmodal: boolean read getbuttonendmodal write setbuttonendmodal;
17491769 property globalshortcuts: boolean read getglobalshortcuts write setglobalshortcuts;
17501770 property localshortcuts: boolean read getlocalshortcuts write setlocalshortcuts;
17511771 property windowpos: windowposty read getwindowpos write setwindowpos;
17521772 property caption: msestring read fcaption write setcaption;
17531773
17541774 windowoptionty = (wo_popup,wo_message,wo_buttonendmodal,wo_groupleader,
17551775 wo_windowcentermessage); //showmessage centered in window
17561776
17571777 optionswindow:
17581778 wo_popup
17591779 - in run-time, hides all OS windows-manager ( WM ) decorations (title bar, buttons "Close/Resize,Min/Max" etc),
17601780 letting only its client area to appear
17611781 so :
17621782 = the window should have own facilities to replace the deactivated WM functionality if needed
17631783 = can't be resized/maximize/minimized/moved
17641784 wo_message
17651785 - similar to "wo_popup" but allows WM to close ( with "Close" button ) & move the window
17661786
17671787 wo_groupleader
17681788 - keeps on the WM taskbar a shortcut to the window
17691789 ( if the parent window is a groupleader too then displays a step upper in its group )
17701790
17711791 Event handlers:
17721792
17731793 - onmove
17741794 = fires once the (window/widget) is created/moved ( with check if really moved by a distance)
17751795
17761796### TFormScrollbox
17771797
17781798 - presents client area of form & parent of its widgets,
17791799 initially stretched to fit the form & bound with anchoring
17801800 but may be adjusted with "bounds" & "anchors"
17811801
17821802 Properties:
17831803
17841804 anchors
17851805 bounds
17861806
17871807 color
17881808 - color of the whole container area ( except its frame ) & form widgets
17891809 if their color is "cl_parent"
17901810
17911811 name = container
17921812
17931813 cursor, enabled, face, frame, helpcontext, hint, optionswidget, popupmenu,
17941814 taborder, tag, visible, onactivate, onafterpaint, onbeforepaint,
17951815 onchildmouseevent, onclientmouseevent, ondeativate, ondefocus, onenter,
17961816 onexit, onfocus, onfontheightdelta, onmouseevent, onpaint, onpopup
17971817 onresize, onshowhint
17981818 - the same meaning as for the served form
17991819
18001820 oncalcminscrollsize
18011821 onscroll
18021822 onchildscaled
18031823
18041824### TFaceList
18051825
18061826### TFrameComp
18071827
18081828See also here: [[Reference: MSEgui/TFrame]].
18091829
18101830 Terminology :
18111831
18121832 {client area = area of the widget which interacts with a user}
18131833
18141834 {bevelling = additional facets rising/sinking frame & client area,
18151835 constists of two parts -
18161836 - external: between frame and widget
18171837 - internal: between frame and client area
18181838 }
18191839
18201840 {frame= flat space between external & internal facets,
18211841 floats at the inner level of the external facet
18221842 }
18231843
18241844 *** Both frame & bevelling affect the client area ***
18251845
18261846 --------------------------
18271847 template:
18281848
18291849 colorclient = color of the client area
18301850
18311851 colorframe = color of the frame
18321852 colorframeactive = used instead of colorframe if the widget is
18331853 active; "cl_default" means same as colorframe.
18341854
18351855 works if (leveli/levelo <> 0 that's the facets exist :
18361856
18371857 colorshadow = color of facets screened from the NW light source
18381858 colordkshadow = color of shadows dropped by the NW light source
18391859 colordkwidth = width of the shadows in pixel, -1=default
18401860
18411861 colorlight = color of facets exposed to the NW light source
18421862 colorhighlight = color of brighter edges of the facets
18431863 colorhlwidth = width of the brighter edges in pixel, -1=default
18441864
18451865 extraspace = if applied to menu items, adds more space between these items
18461866
18471867 framei_:
18481868 (for extendable widgets like menus, these settings widen the widget,
18491869 for non-extendable like buttons - they squeeze the text area )
18501870
18511871 bottom= lower margin of text to the client area
18521872 left = left margin of text to the client area
18531873 right = margin of text to the client area
18541874 top = upper margin of text to the client area
18551875
18561876 framewidth= width of the frame
18571877 leveli = {width=height} of the internal facet, positive -> raised, negative -> sunken
18581878 levelo = {width=height} of the external facet, positive -> raised, negative -> sunken
18591879
18601880 <any frame>
18611881
18621882 *** extends & customizes "tframecomp" ***
18631883
18641884 template
18651885 - "tframecomp" supplying the initial settings
18661886
18671887 colorclient,colordkshadow,colordkwidth,colorframe,colorframeactive,
18681888 colorhighlight,colorhlwidth,colorlight,colorshadow,framewidth,
18691889 leveli, levelo, framei_*,
18701890
18711891 <see "tframecomp">
18721892
18731893 font
18741894 <see "tfont">
18751895
18761896 caption
18771897 - some descriptive text( function name, user prompt,...) placed
18781898 in a N/W/S/E-combination to the widget's client area
18791899
18801900 ***
18811901 non-empty caption if (captionpos <> cp_center) & (captiondistouter=false & captiondist>0) enlarges the framed widget
18821902 by the corresponding size of caption
18831903
18841904 ***
18851905
18861906 captiondist - margin between the caption & the client area
18871907
18881908 captiondistouter :
18891909
18901910 - if "false"(by default), the distance is measured between
18911911 the inner (facing the client area) extent of the caption
18921912 and the client area outward the area,
18931913 the caption is placed outside of the client area
18941914
18951915 - if "true", the caption is mirrored against the edge of client area as
18961916 to the position when "false"
18971917
18981918 *** nagative values of "captiondist" visually inverse "out of" and within ***
18991919
19001920 captionnoclip - do not clip frame and client area for caption background
19011921 ( the client area preserves own background under the caption text)
19021922
19031923 captionnooffset - shift orthogonal to "captiondist"
19041924
19051925 captionpos - "corner" where to place the caption
19061926
19071927 localprops :
19081928
19091929 frl_levelo - "levelo" overrides "template.levelo"
19101930 frl_leveli - "leveli" overrides "template.leveli"
19111931 frl_framewidth - "framewidth" overrides "template.framewidth"
19121932 frl_colorclient - "colorclient" overrides "template.colorclient"
19131933 frl_colorframe - "colorframe" overrides "template.colorframe"
19141934 frl_colorframeactive - "colorframeactive" overrides "template.colorframeactive"
19151935 frl_colordkshadow - "colordkshadow" overrides "template.colordkshadow"
19161936 frl_colorshadow - "colorshadow" overrides "template.colorshadow"
19171937 frl_colorlight - "colorlight" overrides "template.colorlight"
19181938 frl_colorhighlight - "colorhighlight" overrides "template.colorhighlight"
19191939 frl_colordkwidth - "colordkwidth" overrides "template.colordkwidth"
19201940 frl_colorhlwidth - "colorhlwidth" overrides "template.colorhlwidth"
19211941 frl_fileft - "framei_left" overrides "template.framei_left"
19221942 frl_firight - "framei_right" overrides "template.framei_right"
19231943 frl_fitop - "framei_top" overrides "template.framei_top"
19241944 frl_fibottom - "framei_bottom" overrides "template.framei_bottom"
19251945
19261946 frl_nodisable
19271947
19281948### TFaceComp
19291949
19301950See also here: <https://wiki.freepascal.org/Reference:_MSEgui/TFace>
19311951
19321952 - doesn't affect the widget frame but client area of the frame
19331953
19341954 template:
19351955 fade:
19361956 color[i]: = colors forming the fade
19371957 direction: = direction where the fade grows to
19381958 gd_(right/up/left/down)
19391959
19401960 pos[i]: = relational position of color[i] on the direction (0.0..1.0) extent
19411961
19421962 transparency = makes the face half-transparent and enlighten the underlying widget
19431963 with a light source of the selected color
19441964 ( in this case, colors of the face & the widget & the light source
19451965 simply summarize to higher brightness )
19461966
19471967 image:
19481968 see <any image>
19491969
19501970 options:
19511971
19521972 *** The fade colors are used not as colors but RGB alpha values ($00 -> opaque, $ff -> transparent)
19531973 if fao_alpha* are set *** :
19541974
19551975 fao_alphafadeall = applies blending to the widget & all its children
19561976 fao_alphafadenochildren = preserves child widgets from blending
19571977 fao_alphafadeimage = applies blending to "face.image"
19581978
19591979 <any face>
19601980
19611981 *** extends & customizes "tfacecomp" ***
19621982
19631983 fade, image, option
19641984 - see "tfacecomp"
19651985
19661986 template
19671987 - "tfacecomp" supplying the initial settings
19681988
19691989 localprops :
19701990 fal_options - "options" overrides "template.options"
19711991 fal_fadirection - "fade.direction" overrides "template.fade.direction"
19721992 fal_image - "image" overrides "template.image"
19731993 fal_fapos - "fade.pos[i]" overrides "template.fade.pos[i]"
19741994 fal_facolor - "fade.color[i]" overrides "template.fade.color[i]"
19751995 fal_fatransparency - "fade.transparency" overrides "template.fade.transparency"
19761996
19771997### TBitmapComp
19781998
19791999### TScalingwidget
19802000
19812001 optionsscale :
19822002 autosizing to provide room for :
19832003 = {"frame.caption" + "offset_*"}
19842004 = "offset_*" if "frame.caption" is unset and "osc_shrink*" is set
19852005
19862006 = osc_expandx
19872007 - makes the widget wider to fit the caption if needed
19882008
19892009 = osc_shrinkx
19902010 - makes the widget narrower to have no space left & right to the "frame.caption"
19912011
19922012 = osc_expandy
19932013 - makes the widget taller to fit the caption if needed
19942014
19952015 = osc_shrinky
19962016 - makes the widget lower to have no space up & down to the "frame.caption"
19972017
19982018 = osc_invisishrinkx
19992019 - fully h-collapses if "visible=false" ( run-time only )
20002020
20012021 = osc_invisishrinky
20022022 - fully v-collapses if "visible=false" ( run-time only )
20032023
20042024### TImageList
20052025
20062026### TPopupMenu
20072027
20082028### TMainMenu
20092029
20102030## Dialog
20112031
20122032### TFileListview
20132033
20142034### TFileDialog
20152035
20162036### TFaceComp
20172037
20182038### TFileNameEdit
20192039
20202040### TDirDropdownEdit
20212041
20222042### TColorEdit
20232043
20242044### TMemoDialogEdit
20252045
20262046### TPageSizeSelector
20272047
20282048### TPageOrientationSelector
20292049
20302050## Application
20312051
20322052### TGuiApplication
20332053
20342054 tguiapplication = class(tcustomapplication)
20352055 public
20362056
20372057 // [re]starts the system timer with the new period and
20382058 // subscribes the application to be a receiver of the modified "ek_timer" event
20392059 // ( can check for it in the event queue )
20402060 procedure settimer(const us: integer);
20412061
20422062 // finds a window by its winID
20432063 function findwindow(id: winidty; out window: twindow): boolean;
20442064
20452065 // finds a window by its ID & adjusts "rect" so that it
20462066 // fits "bounds_minc*" & "bounds_maxc*" of the found window
20472067 procedure checkwindowrect(winid: winidty; var rect: rectty);
20482068
20492069 // initialises the timer and "megraphics"
20502070 procedure initialize;
20512071
20522072 // frees the allocated system resources (GDI, event subscription, the timer)
20532073 procedure deinitialize;
20542074
20552075 // creates a form instance, it will be shown in "application.run"
20562076 procedure createform(instanceclass: widgetclassty; var reference);
20572077
20582078 // invalidates all registered forms ( all their widgets will be redrawn )
20592079 procedure invalidate;
20602080
20612081 // calls a nested main event loop, forces processing any pending messages,
20622082 procedure processmessages; override; //handle with care!
20632083
20642084 // TRUE if no pending events to process for the application
20652085 function idle: boolean; override;
20662086
20672087 // requests to indicate waiting ( to show the "watches" cursors )
20682088 procedure beginwait; override;
20692089
20702090 // removes the "watches" if no unclosed requests for displaying them,
20712091 // otherwise closes the currently active request
20722092 procedure endwait; override;
20732093
20742094 // TRUE if there are unclosed requests for displaying "watches"
20752095 function waiting: boolean;
20762096
20772097 // TRUE if ESC has just been pressed
20782098 // - if all requests for displaying "watches" are closed then refreshes
20792099 // the internal list of events ( the GUI-queue -> the app event list)
20802100 function waitescaped: boolean; //true if escape pressed while waiting
20812101
20822102 // sets state of the current wait dialogue ( but doesn't close one ) to undefined
20832103 procedure resetwaitdialog;
20842104
20852105 // runs "aexecuteaction" in the main thread in OnIdle mode,
20862106 // then shows a cancellable message,
20872107 // if the one is cancelled then runs "acancelaction" then
20882108 // either fully clears (if exceptions occur )
20892109 // or terminates the execution otherwise,
20902110 // true if not cancelled;
20912111 // "application.processmessages" must be called regularly if "aexecuteaction" is used here,
20922112 // alternatively "aidleaction" can be used, call sleep ( some time ) in order to minimize
20932113 // processor load.
20942114 // If athread <> nil the function starts and terminates the thread
20952115 function waitdialog(const athread: tthreadcomp = nil; const atext: msestring = '';
20962116 const caption: msestring = '';
20972117 const acancelaction: notifyeventty = nil;
20982118 const aexecuteaction: notifyeventty = nil): boolean; override;
20992119
21002120 // closes the currently modal waitdialogue with "cancelled" state
21012121 procedure cancelwait;
21022122
21032123 // closes the currently modal waitdialogue with "ok" state
21042124 procedure terminatewait;
21052125
21062126 function waitstarted: boolean; // the last waitdialogue is currently showing for some requests
21072127 function waitcanceled: boolean; // the last waitdialogue has been cancelled for some request (but can be shown fot others ?)
21082128 function waitterminated: boolean; // the last waitdialogue has been terminated for some request (but can be shown fot others ?)
21092129
21102130 // if called from the main app thread then shows as a modal message describing the exception
21112131 // otherwise posts an async event for which the message will be called
21122132 procedure showexception(e: exception; const leadingtext: string = ''); override;
21132133
21142134 // posts an async event for which the message describing the exception will be called
21152135 procedure showasyncexception(e: exception; const leadingtext: string = '');
21162136
21172137 // "application.errormessage" shows standard error message ( with "ERROR" title )
21182138 procedure errormessage(const amessage: msestring); override;
21192139
21202140 // [re]calculates timings & position of hint for "ahintedwidget"
21212141 // if "ow_timedhint" in "ahintedwidget.foptionswidget" then iys showtime will be
21222142 // "defaulthintshowtime" ( an app wide setting, 3sec by default)
21232143 procedure inithintinfo(var info: hintinfoty; const ahintedwidget: twidget);
21242144
21252145 // shows the supplied hint text within "aposrect" with alignment "aplacement" during "ashowtime",
21262146 // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove
21272147 procedure showhint(const sender: twidget; const hint: msestring;
21282148 const aposrect: rectty; const aplacement: captionposty = cp_bottomleft;
21292149 const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
21302150 // -1 defaultshowtime if ow_timedhint in sender.optionswidget
21312151 const aflags: hintflagsty = defaulthintflags
21322152 ); overload;
21332153
21342154 // shows the supplied hint text at left-top position"apos" during "ashowtime",
21352155 // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove
21362156 procedure showhint(const sender: twidget; const hint: msestring;
21372157 const apos: pointty;
21382158 const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
21392159 // -1 defaultshowtime if ow_timedhint in sender.optionswidget
21402160 const aflags: hintflagsty = defaulthintflags
21412161 ); overload;
21422162
21432163 // shows the hint fully defined in "info" for the widget "sender"
21442164 procedure showhint(const sender: twidget; const info: hintinfoty); overload;
21452165
21462166 // removes the current hint widget & frees its resources & stops its stop timer
21472167 procedure hidehint;
21482168
21492169 // restarts the current hint and its stop timer
21502170 procedure restarthint(const sender: twidget);
21512171
21522172 function hintedwidget: twidget; //last hinted widget
21532173 function activehintedwidget: twidget; //nil if no hint active
21542174
21552175 // returns helpcontext of active widget, '' if none;
21562176 function activehelpcontext: msestring;
21572177
21582178 // returns helpcontext of the widget under mouse, '' if none;
21592179 function mousehelpcontext: msestring;
21602180
21612181 // TRUE if one of the app's window/console is in input focus
21622182 function active: boolean;
21632183
21642184 // returns the desktop resolution ( or the virtual one if used )
21652185 function screensize: sizety;
21662186
21672187 // returns the (virtual) desktop resolution except the tray area,
21682188 // nil -> current active window
21692189 function workarea(const awindow: twindow = nil): rectty;
21702190
21712191 // returns which application window ( a form not an eventwidget, an openglwidget or a windowwidget !)
21722192 // is active ( provides the input focus ),
21732193 // it's same for all widgets of the form served by this window
21742194 function activewindow: twindow;
21752195
21762196 / * A transient window is a descendant of ( "transientfor" ) another window in the stacking order hierarchy */
21772197
21782198 // returns a first non-transient ( on top of the app stacking order ) window upward
21792199 // from the currently active window of the application.
21802200 // or that active window if no such
21812201 function regularactivewindow: twindow;
21822202
21832203 // same as "activewindow" but the window must not be released (?)
21842204 function unreleasedactivewindow: twindow;
21852205
21862206 // returns the focused widget of the currently active window if one exists
21872207 function activewidget: twidget;
21882208
21892209 // returns the widget presenteing the currently active window
21902210 function activerootwidget: twidget;
21912211
21922212 // returns the window ( not hidden or disabled !) under the screen point "pos"
21932213 function windowatpos(const pos: pointty): twindow;
21942214
21952215 // puts to "awidget" the container of widget pointed by "namepath"
21962216 // ( finalizing "." is discarded if found ) ,
21972217 // FALSE if not found, and NIL and TRUE if "namepath" = ''
21982218 function findwidget(const namepath: string; out awidget: twidget): boolean;
21992219
22002220 // rebuilds the application's window list accorrding to the current on-screen Z-order of its windows;
22012221 // window list is ordered by "z" - bottom first & top last;
22022222 // invisibles first
22032223 procedure sortzorder;
22042224
22052225 // returns a copy of the internal window list of application
22062226 function windowar: windowarty;
22072227
22082228 // returns the list of application window winIDs
22092229 function winidar: winidarty;
22102230
22112231 // returns the count of the application windows
22122232 function windowcount: integer;
22132233
22142234 // returns the window by its number ( "index" >= 0) in the application window list
22152235 property windows[const index: integer]: twindow read getwindows;
22162236
22172237 // returns the lowest visible window in stackorder,
22182238 // calls "sortzorder" within
22192239 function bottomwindow: twindow;
22202240
22212241 // returns the highest visible window in stackorder,
22222242 // calls "sortzorder" within
22232243 function topwindow: twindow;
22242244
22252245 // TRUE if all owned windows pass "CanClose" check or
22262246 // don't have focused widgets
22272247 function candefocus: boolean;
22282248
22292249 // subscribes the handler "method" to receive keyboard events
22302250 procedure registeronkeypress(const method: keyeventty);
22312251
22322252 // unsubscribes the handler "method" from receiving keyboard events
22332253 procedure unregisteronkeypress(const method: keyeventty);
22342254
22352255 // subscribes the handler "method" to receive shortcut events
22362256 procedure registeronshortcut(const method: keyeventty);
22372257
22382258 // unsubscribes the handler "method" from receiving shortcut events
22392259 procedure unregisteronshortcut(const method: keyeventty);
22402260
22412261 // subscribes the handler "method" to receive "OnWindowActiveChanged" event ( form-wide )
22422262 procedure registeronactivechanged(const method: activechangeeventty);
22432263
22442264 // unsubscribes the handler "method" from receiving "OnWindowActiveChanged" event ( form-wide )
22452265 procedure unregisteronactivechanged(const method: activechangeeventty);
22462266
22472267 // subscribes the handler "method" to receive "OnDestroyed" events ( form-wide )
22482268 procedure registeronwindowdestroyed(const method: windoweventty);
22492269
22502270 // unsubscribes the handler "method" from receiving "OnDestroyed" events ( form-wide )
22512271 procedure unregisteronwindowdestroyed(const method: windoweventty);
22522272
22532273 // subscribes the handler "method" to receive "OnWindowDestroyed" events ( form-wide )
22542274 procedure registeronwiniddestroyed(const method: winideventty);
22552275
22562276 // unsubscribes the handler "method" form receiving "OnWindowDestroyed" events ( form-wide )
22572277 procedure unregisteronwiniddestroyed(const method: winideventty);
22582278
22592279 // subscribes the handler "method" to receive "ApplicationActiveChanged" events ( form-wide )
22602280 procedure registeronapplicationactivechanged(const method: booleaneventty);
22612281
22622282 // unsubscribes the handler "method" from receiving "ApplicationActiveChanged" events ( form-wide )
22632283 procedure unregisteronapplicationactivechanged(const method: booleaneventty);
22642284
22652285 // tcustomapplication
22662286
22672287 // subscribes the handler "method" to receive "OnTerminated" event ( form-wide )
22682288 procedure registeronterminated(const method: notifyeventty);
22692289
22702290 // unsubscribes the handler "method" from receiving "OnTerminated" events ( form-wide )
22712291 procedure unregisteronterminated(const method: notifyeventty);
22722292
22732293 // subscribes the handler "method" to receive "OnTerminateQuery" event ( form-wide )
22742294 procedure registeronterminate(const method: terminatequeryeventty);
22752295
22762296 // unsubscribes the handler "method" from receiving "OnTerminateQuery" event ( form-wide )
22772297 procedure unregisteronterminate(const method: terminatequeryeventty);
22782298
22792299 // subscribes the handler "method" to receive "OnIdle" event ( form-wide )
22802300 procedure registeronidle(const method: idleeventty);
22812301
22822302 // unsubscribes the handler "method" from receiving "OnIdle" events ( form-wide )
22832303 procedure unregisteronidle(const method: idleeventty);
22842304
22852305 // calls "canclose" of all application windows except the "sender" window
22862306 // if all "canclose"are TRUE then checks "OnTerminateQuery"
22872307 // for all its subscribers ( usually forms of the application )
22882308 procedure terminate(const sender: twindow = nil);
22892309
22902310 // TRUE as long as a "terminate" call is in progress
22912311 function terminating: boolean;
22922312
22932313 // TRUE as long as a "deinitialize" call is in progress
22942314 function deinitializing: boolean;
22952315
22962316 // returns the current caret object ( the text input focus indicator ) of the application
22972317 / ( this object provides facilities to control position & appearance & visibility & timings of the caret )
22982318 property caret: tcaret read fcaret;
22992319
23002320 // returns the current mouse object of the application
23012321 / ( this object provides facitities to control position & appearance of the mouse )
23022322 property mouse: tmouse read fmouse;
23032323
23042324 // simulates mouseparkevent
23052325 // ( an adjusting mouse movement without user intervention - grid snapping, docking etc ?)
23062326 procedure mouseparkevent;
23072327
23082328 // sets mouse position correction for further mouse events,
23092329 // the real position is less the visual one by the supplied shift
23102330 procedure delayedmouseshift(const ashift: pointty);
23112331
23122332 // returns/sets a cursor shape used for widgets having their cursor shape set to "cr_default";
23132333 // setting it to "cr_default" restores the individual widget cursor(s)
23142334 property widgetcursorshape: cursorshapety read fwidgetcursorshape write
23152335 fwidgetcursorshape;
23162336
23172337 // returns/sets the current application-wide cursor shape ( not "watches" if a waiting dialog is currently displayed ! )
23182338 // or request to set a new cursor shape ( app-wide );
23192339 // doesn't change when changing mouse widgets
23202340 //
23212341 // if called from a non-main app thread & no waiting dialogue displayed then redraws
23222342 // the cursor immediately;
23232343 // set it to "cr_default" to restore the shape to one set by "widgetcursorshape"
23242344 //
23252345 property cursorshape: cursorshapety; // cr_arrow, cr_*
23262346
23272347 // assures the displayed mouse cursor shape to be the shape assigned to the currently under-mouse widget,
23282348 // otherwise "cr_default"
23292349 procedure updatecursorshape; //restores cursorshape of mousewidget
23302350
23312351 // returns a widget of the application where the mouse is currently positioned over
23322352 property mousewidget: twidget read fmousewidget;
23332353
23342354 // returns a widget of the application currently "owning" the mouse ( grabbing all mouse input )
23352355 property mousecapturewidget: twidget read fmousecapturewidget;
23362356
23372357 // returns/sets a window to become the main window of the application
23382358 // then resets all other application windows to the window group it belongs to ( Linux only );
23392359 //
23402360 // the main window minimizes all windows if minimized;
23412361 property mainwindow: twindow read fmainwindow write setmainwindow;
23422362
23432363 // returns which system thread was allocated to the application on its start
23442364 // ( the main thread )
23452365 property thread: threadty read fthread;
23462366
23472367 // returns teh widget where a mouse button click occured last time
23482368 // ( to compare with when determinibg whether another widget is clicked )
23492369 property buttonpresswidgetbefore: twidget read fbuttonpresswidgetbefore;
23502370
23512371 // returns teh widget where a mouse button release occured last time
23522372 // ( to compare with when determinibg whether another widget is clicked )
23532373 property buttonreleasewidgetbefore: twidget read fbuttonreleasewidgetbefore;
23542374
23552375 // returns/sets the interval of mouse double click recognition ( in microsecs ),
23562376 // defaults to 0.4 sec
23572377 property dblclicktime: integer read fdblclicktime write fdblclicktime default
23582378 defaultdblclicktime; //us
23592379
23602380 // tcustomapplication
23612381
23622382 // creates a datamodule instance ( its startup code including "OnLoaded" is executed )
23632383 procedure createdatamodule(instanceclass: msecomponentclassty; var reference);
23642384
23652385 // enters the application event loop;
23662386 //
23672387 // once the loop finishes, performs "OnTerminated" for all its subscribers,
23682388 // destroys all application forms ( components & windows )
23692389 procedure run;
23702390
23712391 // TRUE if the eventloop is entered
23722392 function running: boolean;
23732393
23742394 // returns/sets the application name
23752395 // ( defaults to the full path to application executable in the native OS format );
23762396 // currently, only for informatiion query purposes
23772397 property applicationname: msestring read fapplicationname write fapplicationname;
23782398
23792399
23802400 // if exclusive "rights" are satisfied for the main thread ( a mutex lock is OK ) & the event loop is in progress
23812401 // then posts the "event" to the main application thread for asyc processing,
23822402 // otherwise adds the event to the internal list for further handling as soon as the above conditions meet
23832403 procedure postevent(event: tevent);
23842404
23852405 // TRUE if never idle since last call,
23862406 // unlocks the application and calls sleep if not mainthread and asleepus >= 0
23872407 function checkoverload(const asleepus: integer = 100000): boolean;
23882408
23892409 // returns/sets the application exception handler
23902410 property onexception: exceptioneventty read fonexception write fonexception;
23912411
23922412 // if not "eabort" & no unhandled exceptions,
23932413 // executes the above "OnException" code if assigned
23942414 // or shows an exception message otherwise;
23952415 procedure handleexception(sender: tobject = nil;
23962416 const leadingtext: string = '');
23972417
23982418 // synchronizes the calling thread with the main event loop ( via a mutex),
23992419 // TRUE if the calling thread allready holds the mutex,
24002420 // the mutex is recursive
24012421 function lock: boolean;
24022422
24032423 // tries to synchronize the calling thread with the main event loop ( via a mutex)
24042424 function trylock: boolean;
24052425
24062426 // releases the mutex if the calling thread holds the mutex,
24072427 // TRUE if no unlock done
24082428 function unlock: boolean;
24092429
24102430 // releases the mutex recursively if the calling thread holds the mutex,
24112431 // returns "count" for the below "relockall"
24122432 function unlockall: integer;
24132433
24142434 // regains the mutex to serve "count" locks
24152435 procedure relockall(count: integer);
24162436
24172437 // creates a syncronize event ( which will fire asyncronously then waits for another thread will allow it to finish ), assigns "proc" to it as the event handler,
24182438 // then frees all locks temporarily then posts the event to the app event queue & waits fot it to be processed the resores the locks;
24192439 //
24202440 // TRUE if not aborted, quiet -> shows no exceptions if occurs
24212441 //
24222442 // the "syncronize event" is an event owning a semaphore which can be touched by another thread
24232443 // thus causing "event.waitfo" to return & to exec the event handler code
24242444 //
24252445 function synchronize(const proc: objectprocty;
24262446 const quite: boolean = false): boolean;
24272447
24282448 // TRUE if the calling ( this function ) thread is the application main thread
24292449 function ismainthread: boolean;
24302450
24312451 // TRUE if the currently locked thread is the application main thread
24322452 function islockthread: boolean;
24332453
24342454 // waith for "athread" to terminate,
24352455 // does "unlock-relock" around waiting
24362456 procedure waitforthread(athread: tmsethread);
24372457
24382458 // post a "nothing-to-do" event for asynchronous processing in the main thread
24392459 procedure wakeupmainthread;
24402460
24412461 // invalidates all registered forms of the application so that their widgets redraw land-specific captions
24422462 // ( changed by "mseconsts.setlangconsts" ),
24432463 // called internally in "setlangconsts" before return
24442464 procedure langchanged; virtual;
24452465
24462466 // returns/sets "aps_terminated" state flag ( no actions ? )
24472467 // this flag is also set internally by "terminate" if not cancelled
24482468 property terminated: boolean read getterminated write setterminated;
24492469
24502470 // returns the number of "handleexception" calls having an effect ( a message or the handler code )
24512471 property exceptioncount: longword read fexceptioncount;
24522472
24532473 private
24542474 // function tinternalapplication.beginmodal(const sender: twindow): boolean;
24552475
24562476## DB
24572477
24582478### DBedit
24592479
24602480### DBfields
24612481
24622482### TDBwidgetgrid
24632483
24642484 Properties:
24652485
24662486 anchors - ...
24672487 bounds - ...
24682488
24692489 color
24702490 - color of the grid's client area
24712491 cursor
24722492 - cursor shape when the mouse is over the client area
24732493
24742494 datacols
24752495 colorselect
24762496 linecolor
24772497 linecolorfix
24782498 linewidth
24792499 newrowcol
24802500
24812501 options
24822502 co_readonly
24832503 co_nofocus
24842504 co_invisible
24852505 co_disabled
24862506 co_drawfocus
24872507 co_mousemovefocus
24882508 co_lefbuttonfocusonly
24892509 co_focusselect
24902510 co_mouseselect
24912511 co_keyselect
24922512 co_multiselect
24932513 co_resetselectionexit
24942514 co_rowselect
24952515 co_fixwidth
24962516 co_fixpos
24972517 co_fill
24982518 co_proportional
24992519 co_nohscroll
25002520 co_savevalue
25012521 co_savestate
25022522 co_rowfont
25032523 co_rowcolor
25042524 co_zebracolor
25052525 co_nosort
25062526 co_sortdescent
25072527 co_norearrange
25082528 co_cancopy
25092529 co_canpaste
25102530 co_mousescrollrow
25112531 co_rowdatachange
25122532
25132533 sortcol
25142534 width
25152535
25162536 items[N]
25172537 color
25182538 colorselect
25192539 datalist - ???
25202540 face - see <any face>
25212541 fontselect - see <any font>
25222542 frame - see <any frame>
25232543 linecolor
25242544 linecolorfix
25252545 linewidth
25262546 name
25272547
25282548 options
25292549
25302550
25312551### Report
25322552
25332553#### TRepSpacer
25342554
25352555#### TRecordBand
25362556
25372557#### TrepValueDisp
25382558
25392559#### TRepPageNumdisp
25402560
25412561#### TRepPrintDateDisp
25422562
25432563#### TBandGroup
25442564
25452565#### TTileArea
25462566
25472567## Design
25482568
25492569### TGdbMi
25502570
25512571### TSyntaxEdit
25522572
25532573### TSyntaxPainter
25542574
25552575## Comm
25562576
25572577### TCommPort
25582578
25592579### TAsciiCommPort
25602580
25612581### TAsciiProtPort
25622582
25632583### TCommSelector
25642584
25652585## General stuff
25662586
25672587### Properties for all widgets
25682588
25692589 name
25702590
25712591 anchors
25722592
25732593 -----------
25742594
25752595 - they control of design/runtime sticking widgets to their parents
25762596
25772597 - dimention pair ( top/bottom or left/right ) both set to "false" cause
25782598 the widget to fit the parent's client area in that dimention;
25792599 this effect may be partial in case of "bounds_c*max" settings limit the extents
25802600
25812601 *** Return to the look "before dimention fit" is only possible by manual resizing or setting "bounds_*"
25822602 -----------
25832603 an_left
25842604 - on run-time, resizes/shifts left the widget to keep the design-set distance
25852605 between the widget's left border and the left side of parent's client area
25862606 as the parent resizes, until scrolling begins
25872607
25882608 an_top
25892609 - on run-time, resizes/shifts up the widget to keep the design-set distance
25902610 between the widget's top border and the upper side of parent's client area
25912611 as the parent resizes, until scrolling begins
25922612
25932613 an_right
25942614 - on run-time, resizes/shifts right the widget to keep the design-set distance
25952615 between the widget's right border and the right side of parent's client area
25962616 as the parent resizes, until scrolling begins
25972617
25982618 an_bottom
25992619 - on run-time, resizes/shifts down the widget to keep the design-set distance
26002620 between the widget's bottom border and the lower side of parent's client area
26012621 as the parent resizes, until scrolling begins
26022622
26032623 bounds
26042624
26052625 cx - width of the widget
26062626 cxmax, cxmin - design/runtime width of the widget is enforced between "cxmax" and "cxmin"
26072627 cy - height of the widget
26082628 cymax, cymin - design/runtime height of the widget is enforced between "cymax" and "cymin"
26092629 x - distance between the widget's left border and the left side of parent's client area
26102630 y - distance between the widget's top border and the upper side of parent's client area
26112631
26122632 autosize
26132633
26142634 -----------
26152635 - only applicable to widgets with "ow_autosize" set
26162636 - the effect may be partial in case when "bounds_c*max" settings limit the extents
26172637 -----------
26182638
26192639 cx - addition to width of the widget (with h-centering post applied)
26202640 cy - addition to height of the widget (with v-centering post applied)
26212641
26222642 - color
26232643 = the default color of client area & caption text background
26242644 = may be overwritten:
26252645 * the client area - with "frame.colorclient"
26262646 * the caption BG - with "frame.font.colorbackground"
26272647
26282648 - font
26292649 = see {any font}
26302650
26312651 - frame
26322652 = see {any frame}
26332653
26342654 - face
26352655 = see {any face}
26362656
26372657 - hint
26382658 = descriptive text appearing when mouse pointer enters the widget
26392659
26402660 - cursor
26412661 = shape of the mouse pointer over the client area of widget (run-time only)
26422662
26432663 - visible
26442664 = "true" allow the widget to appear ( run-time only )
26452665
26462666 - enabled
26472667 = "true" allows the widget to participate in GUI interaction
26482668 = "false" disallows the widget & its children :
26492669 * processing all events & shortcuts & menu calls
26502670 * auto "CanClose" check
26512671
26522672 Also "false" usually paints the widget in color marking
26532673 the "disabled" state ( usually light gray font color )
26542674
26552675 - popupmenu
26562676 = reference to a preset tpopupmenu widget serving the right-click menu
26572677
26582678 - taborder
26592679 - {0..N} order number when TAB-key cycling through widgets in the container
26602680
26612681 - tag
26622682 - an integer value bound to this widget instance
26632683
26642684 - helpcontext
26652685 = a string returned by "(active/mouse)helpcontext" methods of the owning form
26662686 when this widget is focused or under mouse in the active window
26672687
26682688 - zorder
26692689 = reading: finds the current Z-order of the widget's window
26702690 = setting: if the value = 0 then lowers the widget's window in the stacking hierarchy, otherwise rises
26712691
26722692 optionswidget:
26732693
26742694 ow_background
26752695 - keeps the window/widget on bottom of the Z-order stack.
26762696
26772697 ow_top
26782698 - keeps the window/widget in foreground
26792699
26802700 ow_noautosizing
26812701 - when docking, not to resize for the docking area
26822702
26832703 ow_mousefocus
26842704 - "false" here disables focusing the widget with mouse
26852705 ( and "OnFocus" doesn't fire on mouse clicks )
26862706
26872707 ow_tabfocus
26882708 - "false" here disables focusing the widget with "TAB" key
26892709 ( and "OnFocus" doesn't fire on TAB pressed )
26902710
26912711 ow_parenttabfocus
26922712 - enters the childs on TAB-focusing then returns to the widget after
26932713 sequential TAB-ing through its child widgets,
26942714 otherwise TAB-ing cycles on the children if entered
26952715
26962716 ow_arrowfocus
26972717 - allows the widget ( and its children in turn ) to be focused with
26982718 the arrow keys
26992719
27002720 ow_subfocus, ow_arrowfocusin, ow_arrowfocusout
27012721 - in case of arrow keys focusing enabled for child-containing widget,
27022722 determine behaviour on entering & leaving the widget, see the below table:
27032723
27042724 ow_subfocus | ow_arrowfocusin | ow_arrowfocusout | effect
27052725
27062726 FALSE FALSE FALSE entering-/leaving-
27072727 FALSE FALSE TRUE entering-/leaving+
27082728 FALSE TRUE FALSE entering(nearest)+/leaving-
27092729 FALSE TRUE TRUE entering(nearest)+/leaving+
27102730 TRUE FALSE FALSE entering(last focused)+/leaving-
27112731 TRUE FALSE TRUE entering(last focused)+/leaving+
27122732 TRUE TRUE FALSE entering(nearest)+/leaving-
27132733 TRUE TRUE TRUE entering(nearest)+/leaving+
27142734
27152735 - "entering" is focusing on a child within the widget
27162736 - "leaving" is return from last child onto the widget's level
27172737 - "nearest" is the child closest on the arrow direction
27182738 - "last focused" is the child focused on last leaving the widget
27192739
27202740 *** The Up/Down arrow keys can leave from the children circle,
27212741 but Left/Right can only toggle between the children ***
27222742
27232743 *** mouse entering/leaving isn't controllable by these options
27242744
27252745 ow_focusbackonesc
27262746 - on pressing "Esc", returns input focus to the previously focused widget
27272747
27282748 ow_noparentshortcut
27292749
27302750 *** disables processing of delegated ( from the parent ) shortcuts ***
27312751
27322752 - "true" here disables processing shortcuts if they're delegated
27332753 from the parent widget ( obviously, not processed by the parent )
27342754
27352755 ow_nochildshortcut
27362756
27372757 *** disables delegating shortcuts to the parent for taking decision ***
27382758
27392759 - if "true" then the widget tries to process it by oneself
27402760 otherwise it's passed to the parent widget for further chaining
27412761
27422762 *** A shortcut can only be processed once ( by one widget ) ***
27432763
27442764 ow_canclosenil
27452765 - "true" here allows to continue even if there's contained widget(s)
27462766 not passing "CanClose" check
27472767
27482768 ow_mousetransparent
27492769 - "true" here causes the widget oneself ( not its contained ones )
27502770 not to react to mouse events ( just allow them through to the children )
27512771
27522772 ow_mousewheel
27532773 - enables/disables {scrolling/navigating} with wheel of ImPS/2 etc mouse
27542774
27552775 ow_noscroll
27562776 - don't use screen image scrolling for twidget.scrollrect,
27572777 redraw the whole scrolled widget rectangle instead;
27582778 sometimes needed with background fades.
27592779
27602780 ow_nochildpaintclip
27612781 -
27622782
27632783 ow_destroywidgets
27642784 - "true" here causes calling "free" for all containing widgets as well
27652785
27662786 ow_hinton
27672787 - to show the hint even in case of hinting is disabled on the parent
27682788 ( "parent.ow_hintoff= true & parent.ow_hinton= false" )
27692789
27702790 ow_hintoff
27712791 - "true" here combined with "ow_hinton=false" fully disables displaying the hint
27722792
27732793 ow_multiplehint
27742794 - "true" here causes the widget to redisplay its hint on each {>3px} move within the widget oneself
27752795
27762796 ow_timedhint
27772797 - "true" here causes hint of the widget to disappear after a timed inteval (about 2 secs by default)
27782798
27792799 ow_fontlineheight (design-time only)
27802800 - causes "extraspace" of the last text line to be drawn,
27812801 in turn it causes adjustment of widget height if "ow_autoscale" is set
27822802
27832803 *** makes sence only if "ow_autoscale=true" & ow_autosize=false & "extraspace <> 0" ***
27842804
27852805 ow_fontglyphheight (design-time only)
27862806 - causes only interline "extraspace"-s to be drawn, opposite to "ow_fontlineheight"
27872807
27882808 ow_autoscale (design-time only)
27892809 - causes that if the contents change (design OR run-time) so that its' height changes
27902810 then the widget will be v-scaled as well
27912811
27922812 ow_autosize (design-time only)
27932813 - causes that widget's height & width & client area adjust so that to provide space for contents of the client area
27942814 - no design-time change of height/width are possible as long as this option is in effect
27952815
27962816 ow_autosizeanright
27972817 - when autosizing & {an_right isn't set}, the design-set right margin against the parent is preserved
27982818
27992819 ow_autosizeanbottom
28002820 - when autosizing & {an_bottom isn't set}, the design-set bottom margin against the parent is preserved
28012821
28022822 optionsskin:
28032823
28042824 - osc_noskin
28052825 - osc_framebuttononly
28062826 - osc_container
28072827
28082828 Methods:
28092829
28102830 // tmsecomponent
28112831
28122832 // (re)draws the widget according to the related skin if apllicable;
28132833 //
28142834 // also called internally by "loaded" procedure ( before "OnLoaded" code ),
28152835 // by ShowMessage ( for the internal widgets of the message dialogue ),
28162836 // when creating tab & form & menu widgets
28172837 procedure updateskin(const recursive: boolean = false);
28182838
28192839 // TRUE if the instance is created but not yet ready
28202840 // for interaction & accessing data & appearance change & receiving events etc
28212841 // ( the stage between firing "OnCreate" & "OnLoaded" )
28222842 function loading: boolean;
28232843
28242844 {$ifdef FPC}
28252845 procedure setinline(value: boolean); // ?
28262846 procedure setancestor(value: boolean); // ?
28272847 {$endif}
28282848
28292849 // TRUE if all conditios are OK for executing the code of "event" ( a handler must be assigned to the event )
28302850 function canevent(const event: tmethod): boolean;
28312851
28322852 // Shortly, replaces the persistent storage of the widget
28332853 //
28342854 // if {value <> nil} then
28352855 // - if "instance" is nil then calls "createproc" to create the instance,
28362856 // then assigns the instance's value:= "value"
28372857 // otherwise frees "instance"
28382858 procedure setoptionalobject(const value: tpersistent; var instance;
28392859 createproc: createprocty);
28402860
28412861 // creates the persistent storage of the widget via calling "createproc"
28422862 procedure getoptionalobject(const instance: tobject; createproc: createprocty);
28432863
28442864 // obtains & puts to "obj" a CORBA interface entry for "aintf" (GUID,...)
28452865 function getcorbainterface(const aintf: ptypeinfo; out obj) : boolean;
28462866
28472867 // TRUE if the widget is owned, or "self" otherwise
28482868 function checkowned(component: tcomponent): boolean;
28492869
28502870 // TRUE if the widget is owner, or "self" otherwise
28512871 function checkowner(component: tcomponent): boolean;
28522872
28532873 // return the top-most widget in owner chain starting from this widget
28542874 function rootowner: tcomponent;
28552875
28562876 // return the array of owning widgets starting from this widget
28572877 // componentarty[0] is the widget oneself
28582878 function getrootcomponentpath: componentarty;
28592879
28602880 // returns items of objeclinker ( which notify this widget )
28612881 // and free notify list ( which are notified by this widget ),
28622882 // duplicates are removed.
28632883 //
28642884 // Notifies mainly relate to insertion/removal operation on widgets
28652885 // The notify list is maintained by FreeNotification & RemoveFreeNotification
28662886 function linkedobjects: objectarty;
28672887
28682888 // sends "event" recursively to child widgets until no more children or
28692889 // the event is processed ( cea_processed ) by one of the children,
28702890 // "event" will be destroyed if destroyevent= true and not async
28712891 procedure sendcomponentevent(const event: tcomponentevent;
28722892 const destroyevent: boolean = true);
28732893
28742894 // sends "event" to each of owning widgets downward from the root owner,
28752895 // "event" will be destroyed if destroyevent= true and not async
28762896 procedure sendrootcomponentevent(const event: tcomponentevent;
28772897 const destroyevent: boolean = true);
28782898
28792899 // posts an async "atag"-ged event to be handled by oneself
28802900 procedure asyncevent(atag: integer = 0);
28812901
28822902 // posts a "tcomponentevent" instance from sender=self,
28832903 // "kind" is defined when creating the event,
28842904 // and "tag" may be adjusted after creation
28852905 procedure postcomponentevent(const event: tcomponentevent);
28862906
28872907 // returns the classname of the widget if the widget is toplevel,
28882908 // and "tmsecomponent" otherwise )
28892909 property moduleclassname: string read getmoduleclassname;
28902910
28912911 // returns the classname of the widget as the entry of its constructor
28922912 // ( button => tbutton, datamodule => tdm1mo, form => ttstfo, dbstringedit => tdbstringedit,.. )
28932913 property actualclassname: string read getactualclassname;
28942914
28952915 // returns "fmsecomponentstate"
28962916 // ( a set of cs_ismodule,cs_endreadproc,cs_loadedproc,cs_noload, cs_hasskin,cs_noskin )
28972917 property msecomponentstate: msecomponentstatesty read fmsecomponentstate;
28982918
28992919 // returns/sets a pointer associated with the widget
29002920 // ( contrary to the integer "tag", allows to use an arbitary data type
29012921 // for associating data )
29022922 property tagpo: pointer read ftagpo write ftagpo;
29032923
29042924 // returns/sets a string identifying the widget in the help system
29052925 property helpcontext: msestring read gethelpcontext write fhelpcontext;
29062926
29072927 // twidget
29082928
29092929 // creates an instance of the widget, owned by "aowner" if not NIL
29102930 constructor create(aowner: tcomponent); override;
29112931
29122932 destructor destroy; override;
29132933
29142934 // ??
29152935 procedure afterconstruction; override;
29162936
29172937 // rescales the widget frame ( if assigned ) then owned widgets ( if exist, recursively ) then bounds_* then the font ( if assigned )
29182938 // called before inserting in parentwidget,
29192939 // calls "scale(ascale)",
29202940 // no visual repainting
29212941 procedure initnewcomponent(const ascale: real); virtual;
29222942
29232943 // restores the "fontheight" to "font.glyphheight" if "ow_fontglyphheight" or
29242944 // to "font.lineheight" if "ow_fontlineheight" otherwise,
29252945 // ascale is ignored ?
29262946 // calls "synctofontheight->setfontheight",
29272947 // called after inserting in parentwidget,
29282948 // no visual repainting
29292949 procedure initnewwidget(const ascale: real); virtual;
29302950
29312951 // creates the widget frame if not yet created
29322952 procedure createframe;
29332953
29342954 // creates the widget face if not yet created
29352955 procedure createface;
29362956
29372957 // creates the widget font if not yet created
29382958 procedure createfont;
29392959
29402960 // checks ws_loadlock and csdestroing too
29412961 function isloading: boolean;
29422962
29432963 // returns "widgetstatety" - a set of (
29442964 // ws_visible,ws_enabled,ws_active,ws_entered,ws_entering,ws_exiting,
29452965 // ws_focused,ws_mouseinclient,ws_wantmousebutton,ws_wantmousemove,
29462966 // ws_wantmousefocus,ws_iswidget,ws_opaque,ws_nopaint,
29472967 // ws_clicked,ws_mousecaptured,ws_clientmousecaptured,
29482968 // ws_loadlock,ws_loadedproc,ws_showproc,ws_minclientsizevalid,
29492969 // ws_showed,ws_hidden, //used in tcustomeventwidget
29502970 // ws_destroying,ws_staticframe,ws_staticface,ws_isvisible
29512971 //
29522972 // iframe
29532973 function widgetstate: widgetstatesty;
29542974
29552975 // returns "widgetstate1ty" - a set of (
29562976 // (ws1_childscaled,ws1_fontheightlock,
29572977 // ws1_widgetregionvalid,ws1_rootvalid,
29582978 // ws1_anchorsizing,ws1_isstreamed,
29592979 // ws1_scaled, //used in tcustomscalingwidget
29602980 // ws1_noclipchildren,
29612981 // ws1_nodesignvisible,ws1_nodesignframe,ws1_nodesignhandles,
29622982 // ws1_nodesigndelete,ws1_designactive,
29632983 // ws1_fakevisible,ws1_nominsize //used for report size calculations
29642984 // )
29652985 property widgetstate1: widgetstates1ty read fwidgetstate1;
29662986
29672987 * this set of states is needed because the max FPC set size is 32
29682988 thus "widgetstate1ty" can't fit all states
29692989
29702990 // TRUE if the widget is contained within another widget
29712991 // ( tcomponent stuff )
29722992 function hasparent: boolean; override;
29732993
29742994 // returns the parent component if it's a widget or the grandparent otherwise
29752995 function getparentcomponent: tcomponent; override; // tcomponent
29762996
29772997 // TRUE if "awidget" is an ascendant or the widget or they are the same widget
29782998 function checkdescendent(awidget: twidget): boolean;
29792999
29803000 // TRUE if app is running and the widget owns the caret or the caret widget
29813001 function hascaret: boolean;
29823002
29833003 // TRUE if "winid" allocated and not loading and not destroying,
29843004 // all widgets on a form have "winid" of this form ( a real window allocated by the OS )
29853005 // thus have this function TRUE
29863006 function windowallocated: boolean;
29873007
29883008 // TRUE if presents a valid toplevelwindow with assigned "winid"
29893009 function ownswindow: boolean;
29903010
29913011 // invalidated area of the widget, the origin is "clientpos" against the roor widget
29923012 function updaterect: rectty;
29933013
29943014 // calls recursively "canclose" for all contained widgets ( the widget oneself excluded! ),
29953015 // TRUE if none of the widgets return FALSE
29963016 //
29973017 // more specialized widgets may have "canclose" overridden
29983018 // to perform more work than just this call recursion
29993019 // ( not null or range check,.. )
30003020 //
30013021 // "onclosequery" must also pass the check if assigned, for the function to succeed
30023022 function canclose(const newfocus: twidget = nil): boolean; virtual;
30033023
30043024 // checks "canclose" first for focused widget of the window ( form,.. )
30053025 // if it is a descendant of the widget or the widget oneself,
30063026 // then continues with subwidgets of the widget;
30073027 // also - finishes editing ( snapshots "value" ) in the focused widget before checking
30083028 function canparentclose(const newfocus: twidget): boolean; overload;
30093029
30103030 // the above function but with the preserved focus
30113031 function canparentclose: boolean; overload;
30123032 //newfocus = window.focusedwidget
30133033
30143034 function canfocus: boolean; virtual;
30153035 function setfocus(aactivate: boolean = true): boolean; virtual;//true if ok
30163036 procedure nextfocus; //sets inputfocus to then next appropriate widget
30173037
30183038 function findtabfocus(const ataborder: integer): twidget;
30193039 //nil if cannot focus
30203040
30213041 function firsttabfocus: twidget;
30223042 function lasttabfocus: twidget;
30233043 function nexttaborder(const down: boolean = false): twidget;
30243044
30253045 function focusback(const aactivate: boolean = true): boolean;
30263046 //false if focus not changed
30273047
30283048 function parentcolor: colorty;
30293049 function actualcolor: colorty; virtual;
30303050 function actualopaquecolor: colorty;
30313051 function backgroundcolor: colorty;
30323052 function translatecolor(const acolor: colorty): colorty;
30333053
30343054 procedure widgetevent(const event: twidgetevent); virtual;
30353055
30363056 procedure sendwidgetevent(const event: twidgetevent);
30373057 //event will be destroyed
30383058
30393059 procedure release; override;
30403060
30413061 function show(const modal: boolean = false; const transientfor: twindow = nil): modalresultty; virtual;
30423062
30433063 procedure hide;
30443064 procedure activate(const abringtofront: boolean = true); virtual;
30453065 //show and setfocus
30463066
30473067 procedure bringtofront;
30483068 procedure sendtoback;
30493069 procedure stackunder(const predecessor: twidget);
30503070
30513071 procedure paint(const canvas: tcanvas); virtual;
30523072 procedure update; virtual;
30533073 procedure scrollwidgets(const dist: pointty);
30543074
30553075 procedure scrollrect(const dist: pointty; const rect: rectty; scrollcaret: boolean);
30563076 //origin = paintrect.pos
30573077
30583078 procedure scroll(const dist: pointty);
30593079 //scrolls paintrect and widgets
30603080
30613081 procedure getcaret;
30623082 procedure scrollcaret(const dist: pointty);
30633083 function mousecaptured: boolean;
30643084 procedure capturemouse(grab: boolean = true);
30653085 procedure releasemouse;
30663086 procedure capturekeyboard;
30673087 procedure releasekeyboard;
30683088 procedure synctofontheight; virtual;
30693089
30703090 procedure dragevent(var info: draginfoty); virtual;
30713091 procedure dochildscaled(const sender: twidget); virtual;
30723092
30733093 procedure invalidatewidget; //invalidates whole widget
30743094 procedure invalidate; //invalidates clientrect
30753095 procedure invalidaterect(const rect: rectty; org: originty = org_client);
30763096 procedure invalidateframestate;
30773097
30783098 procedure invalidateframestaterect(const rect: rectty;
30793099 const org: originty = org_client);
30803100 function hasoverlappingsiblings(arect: rectty): boolean; //origin = pos
30813101
30823102 function window: twindow;
30833103 function rootwidget: twidget;
30843104
30853105 function parentofcontainer: twidget;
30863106 //parentwidget.parentwidget if parentwidget has not ws_iswidget,
30873107 //parentwidget otherwise
30883108
30893109 property parentwidget: twidget read fparentwidget write setparentwidget;
30903110 function getrootwidgetpath: widgetarty; //root widget is last
30913111
30923112 // number of contained widgets ( the widget oneself excluded ! )
30933113 function widgetcount: integer;
30943114
30953115 function parentwidgetindex: integer; //index in parentwidget.widgets, -1 if none
30963116 property widgets[const index: integer]: twidget read getwidgets;
30973117 function widgetatpos(var info: widgetatposinfoty): twidget; overload;
30983118 function widgetatpos(const pos: pointty): twidget; overload;
30993119
31003120 function widgetatpos(const pos: pointty;
31013121 const state: widgetstatesty): twidget; overload;
31023122
31033123 property taborderedwidgets: widgetarty read gettaborderedwidgets;
31043124
31053125 function findtagwidget(const atag: integer; const aclass: widgetclassty): twidget;
31063126 //returns first matching descendent
31073127
31083128 property container: twidget read getcontainer;
31093129 function containeroffset: pointty;
31103130 function childrencount: integer; virtual;
31113131 property children[const index: integer]: twidget read getchildwidgets; default;
31123132
31133133 function childatpos(const pos: pointty;
31143134 const clientorigin: boolean = true): twidget; virtual;
31153135
31163136 function getsortxchildren: widgetarty;
31173137 function getsortychildren: widgetarty;
31183138 property focusedchild: twidget read ffocusedchild;
31193139 property focusedchildbefore: twidget read ffocusedchildbefore;
31203140
31213141 function mouseeventwidget(const info: mouseeventinfoty): twidget;
31223142
31233143 function checkdescendent(widget: twidget): boolean;
31243144 //true if widget is descendent or self
31253145
31263146 function checkancestor(widget: twidget): boolean;
31273147 //true if widget is ancestor or self
31283148
31293149 function containswidget(awidget: twidget): boolean;
31303150
31313151 procedure insertwidget(const awidget: twidget); overload;
31323152
31333153 procedure insertwidget(const awidget: twidget; const apos: pointty); overload; virtual;
31343154 //widget can be child
31353155
31363156 function iswidgetclick(const info: mouseeventinfoty; const caption: boolean = false): boolean;
31373157 //true if eventtype = et_butonrelease, button is mb_left, clicked and pos in clientrect
31383158 //or in frame.caption if caption = true, origin = pos
31393159
31403160 function isclick(const info: mouseeventinfoty): boolean;
31413161 //true if eventtype = et_butonrelease, button is mb_left, clicked and pos in clientrect
31423162
31433163 function isdblclick(const info: mouseeventinfoty): boolean;
31443164 //true if eventtype = et_butonpress, button is mb_left, pos in clientrect
31453165 // and timedlay to last buttonpress is short
31463166
31473167 function isdblclicked(const info: mouseeventinfoty): boolean;
31483168 //true if eventtype in [et_buttonpress,et_butonrelease], button is mb_left,
31493169 // and timedlay to last same buttonevent is short
31503170
31513171 function isleftbuttondown(const info: mouseeventinfoty): boolean;
31523172 //true if eventtype = et_butonpress, button is mb_left, pos in clientrect
31533173 //origin = paintrect.pos
31543174
31553175 widgetrect: the widget on-screen area including its frame & frame caption
31563176
31573177 paintrect: the widget on-screen area except its frame & frame caption
31583178
31593179 clientrect: virtual area which
31603180 - for non-scrolling widgets, equals to "paintrect", with its "pos:= (0,0)"
31613181 - for scrolling widgets, may be bigger than "paintrect",
31623182 also may shift ( change its "pos" ) when scrolling
31633183
31643184 // the coord of outer top-left corner against the toplevel form = the window owner,
31653185 // including the frame & frame caption
31663186 function rootpos: pointty;
31673187
31683188 // the coord of the outer top-left corner against the screen ( the WM decorations aren't counted in )
31693189 // includes the frame & frame caption
31703190 property screenpos: pointty;
31713191
31723192 // the coord of the outer top-left corner against the parent widget,
31733193 // including the frame & frame caption
31743194 property widgetrect: rectty;
31753195 property pos: pointty; // =widgetrect.pos
31763196 property size: sizety; // =widgetrect.size
31773197 property left: integer; // =bounds_x
31783198 property right: integer; //widgetrect.x + widgetrect.cx, sets cx;
31793199 property top: integer; // =bounds_y
31803200 property bottom: integer; //widgetrect.y + widgetrect.cy, sets cy;
31813201 property width: integer; // =bounds_cx
31823202 property height: integer; // =bounds_cy
31833203 function widgetsizerect: rectty; //pos = nullpoint
31843204
31853205 // the coord of the paint area ( paintrect ) against own outer top-left corner ( against "widgetrect=pos" )
31863206 // except the frame & frame caption
31873207 function paintrect: rectty;
31883208 function paintpos: pointty;
31893209 function paintsize: sizety;
31903210 function innerpaintrect: rectty; // mainly equals to paintrect
31913211 function clientwidgetrect: rectty; // mainly equals to paintrect
31923212 function clientwidgetpos: pointty;
31933213 function clippedpaintrect: rectty; // mainly equals to but clipped by all parentpaintrects
31943214 function innerwidgetrect: rectty; // mainly equals to paintrect
31953215 function innerclientwidgetpos: pointty;
31963216
31973217 // the coord of the paint area ( paintrect ) against own outer top-left corner ( against "widgetrect=pos" )
31983218 // except the frame caption
31993219 function framerect: rectty; // =paintrect except the frame caption area
32003220 function framepos: pointty;
32013221 function framesize: sizety;
32023222
32033223 // the coord of the client area ( clientrect ) against the paint area ( paintrect )
32043224 // usually these areas match
32053225 function clientrect: rectty;
32063226 property clientsize: sizety;
32073227 property clientwidth: integer;
32083228 property clientheight: integer;
32093229 property clientpos: pointty;
32103230
32113231 // the coord of the paint area of the parent against the paint area of this widget
32123232 function paintrectparent: rectty; //nullrect if parent = nil,
32133233
32143234 // the coord of the client area of the parent against the paint area of this widget
32153235 function clientrectparent: rectty; //nullrect if parent = nil,
32163236
32173237 // the coord of the inner area against the client area ( clientrect )
32183238 function innerclientrect: rectty; // mainly equals to clientrect
32193239 function innerclientsize: sizety;
32203240 function innerclientpos: pointty;
32213241
32223242 function framewidth: sizety; //widgetrect.size - paintrect.size
32233243 function clientframewidth: sizety; //widgetrect.size - clientrect.size
32243244 function innerclientframewidth: sizety; //widgetrect.size - innerclientrect.size
32253245 function innerframewidth: sizety; //clientrect.size - innerclientrect.size
32263246
32273247 // the coord of the paint area against the widgetrect(pos) of the parent
32283248 function paintparentpos: pointty; //origin = parentwidget.pos
32293249
32303250 // the coord of the client area against the widgetrect(pos) of the parent
32313251 function clientparentpos: pointty; //origin = parentwidget.pos
32323252
32333253 // the coord of the widgetrect(pos) against the client area of parent
32343254 property parentclientpos: pointty;
32353255
32363256 function clientpostowidgetpos(const apos: pointty): pointty;
32373257 function widgetpostoclientpos(const apos: pointty): pointty;
32383258 function widgetpostopaintpos(const apos: pointty): pointty;
32393259 function paintpostowidgetpos(const apos: pointty): pointty;
32403260 procedure scale(const ascale: real); virtual;
32413261
32423262 property minsize: sizety read fminsize write setminsize;
32433263 property maxsize: sizety read fmaxsize write setmaxsize;
32443264 function maxclientsize: sizety; virtual;
32453265
32463266 property anchors: anchorsty read fanchors write setanchors default defaultanchors;
32473267 property defaultfocuschild: twidget read getdefaultfocuschild write setdefaultfocuschild;
32483268
32493269 procedure changeclientsize(const delta: sizety); //asynchronous
32503270
32513271 function getcanvas(aorigin: originty = org_client): tcanvas;
32523272
32533273 function showing: boolean;
32543274 //true if self and all ancestors visible and window allocated
32553275
32563276 function isenabled: boolean;
32573277 //true if self and all ancestors enabled
32583278
32593279 function active: boolean;
32603280 function entered: boolean;
32613281
32623282 function activeentered: boolean;
32633283 //true if entered and window is regularactivewindow or inactivated
32643284
32653285 function focused: boolean;
32663286 function clicked: boolean;
32673287
32683288 function indexofwidget(const awidget: twidget): integer;
32693289
32703290 procedure changedirection(const avalue: graphicdirectionty;
32713291 var dest: graphicdirectionty); virtual;
32723292
32733293 // (re)arranges "awidgets" horizontally within the parent's client area
32743294 // so that awidget[i] were placed next each other
32753295 // at h-space dist[i], starting from "startx" with the right margin "endmargin";
32763296 //
32773297 // if the number of "dist" is fewer than the number of "awidgets" then the remaining h-spaces are taken
32783298 // as the last "dist[i]" or "0" if none;
32793299 // if the number of "dist" is more than the number of "awidgets" then the extra dist[i] are discarded
32803300 //
32813301 // non-zero "endmargin" causes one of awdidget[i] to h-resize to provide the margin :
32823302 // - if one or more of awidgets[i] have [an_left,an_right] set then the first of such is resized
32833303 // otherwise the last awidgets[i] is h-resized
32843304 //
32853305 procedure placexorder(
32863306 const startx: integer;
32873307 const dist: array of integer;
32883308 const awidgets: array of twidget;
32893309 const endmargin: integer = minint);
32903310
32913311 // (re)arranges "awidgets" vertically within the parent's client area
32923312 // so that awidget[i] were placed upper/lower each other
32933313 // at v-space dist[i], starting from "starty" with the bottom margin "endmargin";
32943314 //
32953315 // if the number of "dist" is fewer than the number of "awidgets" then the remaining v-spaces are taken
32963316 // as the last "dist[i]" or "0" if none;
32973317 // if the number of "dist" is more than the number of "awidgets" then the extra dist[i] are discarded
32983318 //
32993319 // non-zero "endmargin" causes one of awdidget[i] to v-resize to provide the margin :
33003320 // - if one or more of awidgets[i] have [an_top,an_bottom] set then the first of such is resized
33013321 // otherwise the last awidgets[i] is v-resized
33023322 //
33033323 procedure placeyorder(
33043324 const starty: integer;
33053325 const dist: array of integer;
33063326 const awidgets: array of twidget;
33073327 const endmargin: integer = minint);
33083328 //origin = clientpos, endmargin by size adjust of widgets
33093329 //with [an_top,an_bottom], minint -> no change
33103330
33113331 // if {mode <> wam_none} then (re)arranges "awidgets" horizontally within the parent's client area so that
33123332 // awidgets[0] stays on its place but awidgets[1..N] :
33133333 // - if {mode = wam_end} then awidgets[i>=1] move or resize ( if "anchors.al_left" set ) so that they right borders match the right border of awidgets[0]
33143334 // - if {mode = wam_start} then awidgets[i>=1] move or resize ( if "anchors.al_right" set ) so that they left borders match the left border of awidgets[0]
33153335 // - if {mode = wam_center} then awidgets[i>=1] move so that they Y-axes match the Y-axe of awidgets[0]
33163336 //
33173337 // mainly applicable for v-stacked widgets since h-stacked may overlap after such alignment
33183338 //
33193339 // returns the reference point ( the coord of awidgets[0] )
33203340 function alignx(const mode: widgetalignmodety;
33213341 const awidgets: array of twidget): integer;
33223342
33233343 // if {mode <> wam_none} then (re)arranges "awidgets" vertically within the parent's client area so that
33243344 // awidgets[0] stays on its place but awidgets[1..N] :
33253345 // - if {mode = wam_end} then awidgets[i>=1] move or resize ( if "anchors.al_top" set ) so that they bottom borders match the bottom border of awidgets[0]
33263346 // - if {mode = wam_start} then awidgets[i>=1] move or resize ( if "anchors.al_bottom" set ) so that they top borders match the top border of awidgets[0]
33273347 // - if {mode = wam_center} then awidgets[i>=1] move so that they X-axes match the X-axe of awidgets[0]
33283348 //
33293349 // mainly applicable for h-stacked widgets since v-stacked may overlap after such alignment
33303350 //
33313351 // returns the reference point ( the coord of awidgets[0] )
33323352 function aligny(const mode: widgetalignmodety;
33333353 const awidgets: array of twidget): integer;
33343354
33353355 function actualcursor: cursorshapety; virtual;
33363356
33373357 Event handlers:
33383358
33393359 - onactivate
33403360
33413361 fires :
33423362
33433363 = on receiving input focus, just before "OnFocus"
33443364
33453365 = forms specific :
33463366 * on 1-st display of the form after "OnLoaded" ( from "Loaded" procedure)
33473367 * on switch back from another apllication/WM ( "oe_activate" event )
33483368 * after closure of a descendant form
33493369 * on minimizing/maximizing the form
33503370
33513371 - onchildscaled
33523372
33533373 fires :
33543374
33553375 = on child/children resizing due to font height change
33563376
33573377 = form widget: once "form.container" {scrolling widget} is loaded
33583378
33593379 - ondeactivate
33603380 fires
33613381 = form widget: when the form looses input focus
33623382 = non-form widget: when the widget looses input focus
33633383
33643384 - ondefocus
33653385
33663386 fires
33673387 = on disabling the widget
33683388
33693389 = form widget: if another form is focused
33703390 = non-form widget: if another widget is focused
33713391
33723392 - onenter
33733393 = fires on any way of taking parent-wide focus as soon as
33743394 the parent stores the new child's order, before "OnActivate" & "OnFocus"
33753395
33763396 - onexit
33773397 = fires last on parent-wide lossing focus, after "OnDefocus" & "OnDeactivate"
33783398 = for top-level ( not in a container ) forms, doesn't fire
33793399
33803400 - onfocus
33813401 fires
33823402 = once the existing widget takes the focus
33833403 = on showing the widget's form if the widget has the lowest "TabOrder"
33843404
33853405 - onfontheightdelta
33863406 fires
33873407 = if [ow_fontglyphheight OR ow_fontlineheight ] AND {the
33883408 new font height differs from the previos one}
33893409 = before the parent redraws this widget
33903410
33913411 - onpopup
33923412 fires :
33933413 = on calling a popup-menu ( with "RightClick" ), once the menu items of the current level are loaded
33943414 ( before building the submenus )
33953415
33963416 - onresize
33973417
33983418 = fires on creating/(changing size)/(min-max restoring) of widget,
33993419 before actual redrawing
34003420
34013421 = rechecks if there's real work to do
34023422
34033423 - onshowhint
34043424 = fires when a installed hint is activated or on "aplication.showint" called
34053425 = since called last, allows to adjust the default behavior
34063426
34073427 - onbeforeupdateskin
34083428 = fires in "updateskin" ( the widget is loaded etc ) before applying the skin
34093429
34103430 - onafterupdateskin
34113431 = fires in "updateskin" ( the widget is loaded etc ) once the skin is applied
34123432
34133433### TWidget stuff
34143434
34153435 Properties:
34163436 - name
34173437 - anchors
34183438 - bounds
34193439 - color
34203440 - enabled
34213441 - visible
34223442 - <face> : see {any face}
34233443 - <frame> : see {any frame}
34243444 - hint
34253445 - helpcontext
34263446 - tag
34273447 - taborder
34283448 - cursor
34293449 - optionswidget
34303450 - optionsskin
34313451 - popupmenu
34323452
34333453 twidget's event handlers:
34343454
34353455 - on(de)activate
34363456 - onbeforeupdateskin
34373457 - onafterupdateskin
34383458 - onchildscaled
34393459 - onfontheightdelta
34403460 - on(de)focus
34413461 - onenter
34423462 - onmove
34433463 - onpopup
34443464 - onresize
34453465 - onshowhint
34463466
34473467 align_glue :
34483468 ( outer anchoring mode for widget group, in the align mode )
34493469 - wam_none
34503470 - wam_start
34513471 - wan_center
34523472 - wm_end
34533473
34543474 align_leader :
34553475 the widget ( incl another spacer, splitter or layouter ) against which the alignment applies ( the reference widget )
34563476
34573477 align_mode :
34583478 ( inner anchoring mode within widget group, in the align mode )
34593479 - wam_none
34603480 - wam_start
34613481 - wan_center
34623482 - wm_end
34633483
34643484 // Place mode:
34653485
34663486
34673487 place_mindist, place_maxdist:
34683488 - in the place(ment) mode, limits distance between widgets
34693489 ( these distance once calculated also define side margins if applicable )
34703490
34713491 place_mode:
34723492 ( outer anchoring mode for widget group, in the place mode )
34733493 - wam_none
34743494 - wam_start
34753495 - wan_center
34763496 - wm_end
34773497
34783498 place_options:
34793499 - plo_endmargin
34803500 = to resize a widget so that it "eats" extra space if it occurs
34813501
34823502 * only applicable in the place mode, with a limiting value of "place_maxdist" and:
34833503
34843504 1) {place_mode <> wam_none}
34853505 or
34863506 2) {place_mode = wam_end} and {plo_propmargin in place_options}
34873507
34883508 For the exact look, see above
34893509
34903510 - plo_propmargin
34913511 = виджеты расставляются теснее так, чтобы образовались отступы перед и после,
34923512 причем расстояние между центрами виджетов было бы таким же,
34933513 как и растояние между серединами крайних виджетов и соотв. границами зоны расстановки
34943514
34953515 - plo_syncmaxautosize
34963516 = see above
34973517
34983518 - plo_synccaptiondistx
34993519 = see above
35003520
35013521 * affects widgets with opposite cp_left/right set as well
35023522 * the minimal before-adjustment "captiondist" among all widgets limits "captiondist" for each of the widget
35033523 * don't set cfo_captiondistouter here !
35043524
35053525 - plo_synccaptiondisty
35063526 = see above
35073527
35083528 * affects also widgets with opposite cp_top/bottom set
35093529 * the minimal before-adjustment "captiondist" amongst all widgets limits "captiondist" for each of the widget
35103530
35113531 ! here, don't set "cfo_captiondistouter" for affected widgets !
35123532
35133533 - plo_syncpaintwidth
35143534 = see above
35153535
35163536 - plo_syncpaintheight
35173537 = see above
35183538
35193539 - plo_scalesize
35203540 = see above
35213541
35223542 dist_left, dist_right, dist_top, dist_bottom :
35233543 = margins between most outer edge the layouter and
35243544 the corresponding linked widget
35253545
35263546 * see "tspacer" for detail
35273547
35283548 linkleft,linkright,linktop,linkbottom : see "tspacer"
35293549
35303550 options:
35313551 - spao_glueright, spao_gluebottom:
35323552 = set the adjustment dependencies between the layouter and its link_* widgets
35333553
35343554 * see "tspacer" for more details
35353555
35363556 // which mode of widget placement to apply - see above
35373557 optionslayout:
35383558 - lao_alignx
35393559 - lao_aligny
35403560 - lao_placex
35413561 - lao_placey
35423562 - lao_scalewidth
35433563 - lao_scaleheight
35443564 - lao_scaleleft
35453565 - lao_scaletop
35463566
35473567 * lao_place* & lao_align* can't be combined for one direction
35483568
35493569 optionsscale:
35503570
35513571 * cause the layouter to provide full space for the widgets as long as they expand/shrink/move
35523572
35533573 - osc_expandx
35543574 = allocates more h-space if needed
35553575
35563576 - osc_shrinkx
35573577 = removes extra h-space if occurred
35583578
35593579 - osc_expandy
35603580 = allocates more v-space if needed
35613581
35623582 - osc_shrinky
35633583 = removes extra v-space if occurred
35643584
35653585 - osc_invisishrinkx
35663586 = fully h-collapses the layouter if "visible=false" ( run-time only )
35673587
35683588 - osc_invisishrinky
35693589 = fully v-collapses the layoter if "visible=false" ( run-time only )
35703590
35713591 optionsskin:
35723592 = see <any widget>
35733593
35743594 Methods:
35753595
35763596 constructor create(aowner: tcomponent); override;
35773597
35783598### Public stuff
35793599
35803600 (f)window:
35813601 the OS-allocated ( root = toplevel ) window common for all widgets of this window
35823602
35833603 * "widget.fwindow.fowner = widget.self" in case of the widget present the root "fwindow"
35843604 ( owns the window )
35853605
35863606 (f)rootpos:
35873607 position of the widget in the coord of toplevel window not the nearest parent widget alone,
35883608 calculated as sum of such positions ( fwidgetrect.pos ) starting from the toplevel through the
35893609 chain of all parents up to the current widget;
35903610 "nullpoint" (0,0) for toplevel widgets ( window-owning forms,..)
35913611
35923612 screenpos:
35933613 - coord aginst the top-left corner of screen
35943614 - WM decoration & title aren't parts of the widget !
35953615
35963616 widgetrect:
35973617 the widget on-screen area including its frame & frame caption
35983618
35993619 paintrect:
36003620 the widget on-screen area except its frame & frame caption
36013621
36023622 clientrect:
36033623 virtual area which
36043624 - for non-scrolling widgets, equals to "paintrect", with its "pos:= (0,0)"
36053625 - for scrolling widgets, may be bigger than "paintrect",
36063626 also may shift ( change its "pos" ) when scrolling
36073627
36083628 * "t*grid" aren't such scrollable widgets since their virtual height would be limited by
36093629 the X11 "+-32000" limitation,
36103630 so example of such widgets are tscrollbox, "tform.container" etc
36113631
36123632 framerect:
36133633 the widget on-screen area except its frame caption but including inner & outer frame
36143634
36153635 ****************
36163636
36173637 // releases all thread locks then post the event to the app event queue and
36183638 // waits for the event handler finishes ( signalled by "sye_ok on a semaphore )
36193639 // finally restores the locks
36203640 // true if the handler is not aborted
36213641 function synchronizeevent(const aevent: tsynchronizeevent): boolean;
36223642
36233643 // translates "point" coord against "source" widgetrect to "dest" widgetrect
36243644 //
36253645 // * nil "source" = from screen coord
36263646 // * nil "dest" = to screen coord
36273647 procedure translatewidgetpoint1(var point: pointty; const source,dest: twidget);
36283648
36293649 // the function-framed version of "translatewidgetpoint1"
36303650 function translatewidgetpoint(const point: pointty; const source,dest: twidget): pointty;
36313651
36323652 // rect isntead of point,
36333653 // if dest = nil then to screen
36343654 // if source = nil then against screen
36353655 function translatewidgetrect(const rect: rectty; const source,dest: twidget): rectty;
36363656 //-----------------
36373657 // translates "point" coord against "source" paintrect to "dest" paintrect
36383658 // * nil "source" = from screen coord
36393659 // * nil "dest" = to screen coord
36403660 procedure translatepaintpoint1(var point: pointty; const source,dest: twidget);
36413661
36423662 // the function-framed version of "translatepaintpoint1"
36433663 function translatepaintpoint(const point: pointty; const source,dest: twidget): pointty;
36443664
36453665 // rect isntead of point,
36463666 // if dest = nil then to screen
36473667 // if source = nil then against screen
36483668 function translatepaintrect(const rect: rectty;const source,dest: twidget): rectty;
36493669 //-----------------
36503670 // translates "point" coord against "source" clientrect to "dest" clienttrect
36513671 // * nil "source" = from screen coord
36523672 // * nil "dest" = to screen coord
36533673 procedure translateclientpoint1(var point: pointty;
36543674 const source,dest: twidget);
36553675
36563676 // the function-framed version of "translateclientpoint1"
36573677 function translateclientpoint(const point: pointty; const source,dest: twidget): pointty;
36583678
36593679 // rect isntead of point,
36603680 // if dest = nil then to screen
36613681 // if source = nil then against screen
36623682 function translateclientrect(const rect: rectty; const source,dest: twidget): rectty;
36633683 //-----------------
36643684
36653685 // (re)sorts "awidgets" in order of increasing their "widgetrect.x" coords
36663686 // - if parent = nil then the coords are against individual parent of each of "awidgets"
36673687 // - if parent is supplied then the coords are against this parent
36683688 procedure sortwidgetsxorder(var awidgets: widgetarty; const parent: twidget = nil);
36693689
36703690 // (re)sorts "awidgets" in order of increasing their "widgetrect.y" coords
36713691 // - if parent = nil then the coords are against individual parent of each of "awidgets"
36723692 // - if parent is supplied then the coords are against this parent
36733693 procedure sortwidgetsyorder(var awidgets: widgetarty; const parent: twidget = nil);
36743694
36753695 // for each of "widgets", calculates its autosized client area ( min size rect to fit the caption, etc )
36763696 // - both hor & ver sizes of client area of each of "widgets" are adjusted to the max of the above calculated areas,
36773697 // as the result - client areas of all widgets become identically v+h sized
36783698 //
36793699 // * right & bottom anchored margins of each widget are preserved
36803700 procedure syncmaxautosize(const widgets: array of twidget);
36813701
36823702 // for each of "widgets", width of client area of each of "widgets" is adjusted so that
36833703 // external ( by the outer border of frame ) widths of all widgets become identical
36843704 // to the external widht of the widest widget
36853705 //
36863706 // * if "awidth" >= 0 then no determining the widest widget is taken and
36873707 // "awidth" is adjusted to instead, for all widgets
36883708 // * right anchored margins of each widget are lost
36893709 procedure syncminframewidth(const awidgets: array of twidget;
36903710 const awidth: integer = -1);
36913711
36923712 // for each of "widgets", height of client area of each of "widgets" is adjusted so that
36933713 // external ( by the outer border of frame ) heights of all widgets become identical
36943714 // to the external height of the highest widget
36953715 //
36963716 // * if "aheight" >= 0 then no determining the highest widget is taken and
36973717 // "aheight" is adjusted to instead, for all widgets
36983718 // * bottom anchored margins of each widget are lost
36993719 procedure syncminframeheight(const awidgets: array of twidget; const aheight: integer = -1);
37003720
37013721## Projects using MSEgui
37023722
37033723- [[Projects using MSEgui]]
37043724
37053725---
37063726*From the Free Pascal wiki, page "Reference: MSEgui", as it stood on 2021-04-09 after a change by Roland57, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history