Difference between revisions of "Reference: MSEgui"

From Lazarus wiki
Jump to navigationJump to search
Line 515: Line 515:
 
=== TPageSizeSelector ===
 
=== TPageSizeSelector ===
 
=== TPageOrientationSelector ===
 
=== TPageOrientationSelector ===
 +
 +
== Application ==
 +
=== TGuiApplication ===
 +
<pre>
 +
tguiapplication = class(tcustomapplication)
 +
  public
 +
 +
  // [re]starts the system timer with the new period and
 +
  // subscribes the application to be a receiver of the modified "ek_timer" event
 +
  // ( can check for it in the event queue )
 +
  procedure settimer(const us: integer);
 +
 +
  // finds a window by its winID
 +
  function findwindow(id: winidty; out window: twindow): boolean;
 +
 +
  // finds a window by its ID & adjusts "rect" so that it
 +
  // fits "bounds_minc*" & "bounds_maxc*" of the found window
 +
  procedure checkwindowrect(winid: winidty; var rect: rectty);
 +
 +
  // inits the timer and "megraphics"
 +
  procedure initialize;
 +
 +
  // frees the allocated system resources (GDI, event subsription, the timer)
 +
  procedure deinitialize;
 +
 +
  // creates a form instance, it will be shown in "application.run"
 +
  procedure createform(instanceclass: widgetclassty; var reference);
 +
 +
  // invalidates all registered forms ( all their widgets will be redrawn )
 +
  procedure invalidate;
 +
 
 +
  // calls a nested main eventloop, forces processing any pending messages,
 +
  procedure processmessages; override; //handle with care!
 +
 +
  // TRUE if no pending events to process for the application
 +
  function idle: boolean; override;
 +
 
 +
  // requests to indicate waiting ( to show the "watches" cursos )
 +
  procedure beginwait; override;
 +
 +
  // removes the "watches" if no unclosed requests for displaying them,
 +
  // otherwise closes the currently active request
 +
  procedure endwait; override;
 +
 +
  // TRUE if there're unclosed requests for displaying "watches"
 +
  function waiting: boolean;
 +
 +
  // TRUE if ESC has just been pressed
 +
  //  - if all requests for displaying "watches" are closed then refreshes
 +
  //    the internal list of events ( the GUI-queue -> the app event list)
 +
  function waitescaped: boolean; //true if escape pressed while waiting
 +
 +
  // sets state of the current wait dialogue ( but doesn't close one ) to undefined
 +
  procedure resetwaitdialog; 
 +
 +
  // runs "aexecuteaction" in the main thread in OnIdle mode,
 +
  // then shows a cancellable message,
 +
  // if the one is cancelled then runs "acancelaction" then
 +
  // either fully clears (if exceptions occur )
 +
  // or terminates the execution otherwise,
 +
  // true if not cancelled;
 +
  // "application.processmessages" must be called regularly if "aexecuteaction" is used here,
 +
  // alternatively "aidleaction" can be used, call sleep ( some time ) in order to minimize
 +
  // processor load.
 +
  // If athread <> nil the function starts and terminates the thread   
 +
  function waitdialog(const athread: tthreadcomp = nil; const atext: msestring = '';
 +
                  const caption: msestring = '';
 +
                  const acancelaction: notifyeventty = nil;
 +
                  const aexecuteaction: notifyeventty = nil): boolean; override;
 +
 +
  // closes the currently modal waitdialogue with "cancelled" state
 +
  procedure cancelwait;
 +
 +
  // closes the currently modal waitdialogue with "ok" state
 +
  procedure terminatewait;
 +
 +
  function waitstarted: boolean;  // the last waitdialogue is currently showing for some requests
 +
  function waitcanceled: boolean;  // the last waitdialogue has been cancelled for some request (but can be shown fot others ?)
 +
  function waitterminated: boolean; // the last waitdialogue has been terminated for some request (but can be shown fot others ?)
 +
 +
  // if called from the main app thread then shows as a modal message describing the exception
 +
  // otherwise posts an async event for which the message will be called
 +
  procedure showexception(e: exception; const leadingtext: string = ''); override;
 +
 +
  // posts an async event for which the message describing the exception will be called
 +
  procedure showasyncexception(e: exception; const leadingtext: string = '');
 +
 +
  // "application.errormessage" shows standard error message ( with "ERROR" title )
 +
  procedure errormessage(const amessage: msestring); override;
 +
 +
  // [re]calculates timings & position of hint for "ahintedwidget"
 +
  // if "ow_timedhint" in "ahintedwidget.foptionswidget" then iys showtime will be
 +
  // "defaulthintshowtime" ( an app wide setting, 3sec by default) 
 +
  procedure inithintinfo(var info: hintinfoty; const ahintedwidget: twidget);
 +
 +
 +
  // shows the supplied hint text within "aposrect" with alignment "aplacement" during "ashowtime",
 +
  // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove 
 +
  procedure showhint(const sender: twidget; const hint: msestring;
 +
              const aposrect: rectty; const aplacement: captionposty = cp_bottomleft;
 +
              const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
 +
                // -1 defaultshowtime if ow_timedhint in sender.optionswidget
 +
              const aflags: hintflagsty = defaulthintflags
 +
                      ); overload;
 +
 +
  // shows the supplied hint text at left-top position"apos" during "ashowtime",
 +
  // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove 
 +
  procedure showhint(const sender: twidget; const hint: msestring;
 +
              const apos: pointty;
 +
              const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
 +
                // -1 defaultshowtime if ow_timedhint in sender.optionswidget
 +
              const aflags: hintflagsty = defaulthintflags
 +
                      ); overload;
 +
 +
  // shows the hint fully defined in "info" for the widget "sender"
 +
  procedure showhint(const sender: twidget; const info: hintinfoty); overload;
 +
 +
  // removes the current hint widget & frees its resources & stops its stop timer
 +
  procedure hidehint;
 +
 +
  // restarts the current hint and its stop timer
 +
  procedure restarthint(const sender: twidget);
 +
 +
  function hintedwidget: twidget; //last hinted widget
 +
  function activehintedwidget: twidget; //nil if no hint active
 +
 +
  // returns helpcontext of active widget, '' if none; 
 +
  function activehelpcontext: msestring;
 +
 +
  // returns helpcontext of the widget under mouse, '' if none;
 +
  function mousehelpcontext: msestring;
 +
 +
  // TRUE if one of the app's window/console is in input focus
 +
  function active: boolean;
 +
 +
  // returns the desktop resolution ( or the virtual one if used )
 +
  function screensize: sizety;
 +
 +
  // returns the (virtual) desktop resolution except the tray area,
 +
  // nil -> current active window
 +
  function workarea(const awindow: twindow = nil): rectty;
 +
 +
  // returns which application window ( a form not an eventwidget, an openglwidget or a windowwidget !)
 +
  // is active ( provides the input focus ),
 +
  // it's same for all widgets of the form served by this window
 +
  function activewindow: twindow;
 +
 +
/ * A transient window is a descendant of ( "transientfor" ) another window in the stacking order hierarchy */
 +
 +
  // returns a first non-transient ( on top of the app stacking order ) window upward
 +
  // from the currently active window of the application.
 +
  // or that active window if no such
 +
  function regularactivewindow: twindow;
 +
 +
  // same as "activewindow" but the window must not be released (?)
 +
  function unreleasedactivewindow: twindow;
 +
 +
  // returns the focused widget of the currently active window if one exists
 +
  function activewidget: twidget;
 +
 +
  // returns the widget presenteing the currently active window
 +
  function activerootwidget: twidget;
 +
 
 +
  // returns the window ( not hidden or disabled !) under the screen point "pos"
 +
  function windowatpos(const pos: pointty): twindow;
 +
 +
  // puts to "awidget" the container of widget pointed by "namepath"
 +
  // ( finalizing "." is discarded if found ) ,
 +
  // FALSE if not found, and NIL and TRUE if "namepath" = ''
 +
  function findwidget(const namepath: string; out awidget: twidget): boolean;
 +
 +
  // rebuilds the application's window list accorrding to the current on-screen Z-order of its windows;
 +
  // window list is ordered by "z" - bottom first & top last;
 +
  // invisibles first
 +
  procedure sortzorder;
 +
 +
  // returns a copy of the internal window list of application
 +
  function windowar: windowarty;
 +
 +
  // returns the list of application window winIDs
 +
  function winidar: winidarty;
 +
 +
  // returns the count of the application windows   
 +
  function windowcount: integer;
 +
 +
  // returns the window by its number ( "index" >= 0) in the application window list
 +
  property windows[const index: integer]: twindow read getwindows;
 +
 +
  // returns the lowest visible window in stackorder,
 +
  // calls "sortzorder" within
 +
  function bottomwindow: twindow;
 +
 +
  // returns the highest visible window in stackorder,
 +
  // calls "sortzorder" within
 +
  function topwindow: twindow;
 +
 +
 +
  // TRUE if all owned windows pass "CanClose" check or
 +
  // don't have focused widgets
 +
  function candefocus: boolean;
 +
 +
  // subscribes the handler "method" to receive keyboard events
 +
  procedure registeronkeypress(const method: keyeventty);
 +
 +
  // unsubscribes the handler "method" from receiving keyboard events
 +
  procedure unregisteronkeypress(const method: keyeventty);
 +
 +
  // subscribes the handler "method" to receive shortcut events
 +
  procedure registeronshortcut(const method: keyeventty);
 +
 +
  // unsubscribes the handler "method" from receiving shortcut events
 +
  procedure unregisteronshortcut(const method: keyeventty);
 +
 +
  // subscribes the handler "method" to receive "OnWindowActiveChanged" event ( form-wide )
 +
  procedure registeronactivechanged(const method: activechangeeventty);
 +
 +
  // unsubscribes the handler "method" from receiving "OnWindowActiveChanged" event ( form-wide )
 +
  procedure unregisteronactivechanged(const method: activechangeeventty);
 +
 +
  // subscribes the handler "method" to receive "OnDestroyed" events ( form-wide )
 +
  procedure registeronwindowdestroyed(const method: windoweventty);
 +
 +
  // unsubscribes the handler "method" from receiving "OnDestroyed" events ( form-wide )
 +
  procedure unregisteronwindowdestroyed(const method: windoweventty);
 +
 +
  // subscribes the handler "method" to receive "OnWindowDestroyed" events ( form-wide )
 +
  procedure registeronwiniddestroyed(const method: winideventty);
 +
 +
  // unsubscribes the handler "method" form receiving "OnWindowDestroyed" events ( form-wide )
 +
  procedure unregisteronwiniddestroyed(const method: winideventty);
 +
 +
  // subscribes the handler "method" to receive "ApplicationActiveChanged" events ( form-wide )
 +
  procedure registeronapplicationactivechanged(const method: booleaneventty);
 +
 +
  // unsubscribes the handler "method" from receiving "ApplicationActiveChanged" events ( form-wide )
 +
  procedure unregisteronapplicationactivechanged(const method: booleaneventty);
 +
 +
// tcustomapplication
 +
 +
  // subscribes the handler "method" to receive "OnTerminated" event ( form-wide )
 +
  procedure registeronterminated(const method: notifyeventty);
 +
 +
  // unsubscribes the handler "method" from receiving "OnTerminated" events ( form-wide )
 +
  procedure unregisteronterminated(const method: notifyeventty);
 +
 +
  // subscribes the handler "method" to receive "OnTerminateQuery" event ( form-wide )
 +
  procedure registeronterminate(const method: terminatequeryeventty);
 +
 +
  // unsubscribes the handler "method" from receiving "OnTerminateQuery" event ( form-wide )
 +
  procedure unregisteronterminate(const method: terminatequeryeventty);
 +
 +
  // subscribes the handler "method" to receive "OnIdle" event ( form-wide )
 +
  procedure registeronidle(const method: idleeventty);
 +
 +
  // unsubscribes the handler "method" from receiving "OnIdle" events ( form-wide )
 +
  procedure unregisteronidle(const method: idleeventty);
 +
 +
  // calls "canclose" of all application windows except the "sender" window
 +
  // if all "canclose"are TRUE then checks "OnTerminateQuery"
 +
  // for all its subscribers ( usually forms of the application )
 +
  procedure terminate(const sender: twindow = nil);
 +
 +
  // TRUE as long as a "terminate" call is in progress
 +
  function terminating: boolean;
 +
 +
  // TRUE as long as a "deinitialize" call is in progress
 +
  function deinitializing: boolean;
 +
 
 +
  // returns the current caret object ( the text input focus indicator ) of the application
 +
  / ( this object provides facitities to control position & appearance & visibility & timings of the caret )
 +
  property caret: tcaret read fcaret;
 +
 +
  // returns the current mouse object of the application
 +
  / ( this object provides facitities to control position & appearance of the mouse ) 
 +
  property mouse: tmouse read fmouse;
 +
 +
  // simulates mouseparkevent
 +
  // ( an adjusting mouse movement without user intervention - grid snapping, docking etc ?)
 +
  procedure mouseparkevent;
 +
 +
  // sets mouse position correction for further mouse events,
 +
  // the real position is less the visual one by the supplied shift
 +
  procedure delayedmouseshift(const ashift: pointty);
 +
 +
  // returns/sets a cursor shape used for widgets having their cursor shape set to "cr_default";
 +
  // setting it to "cr_default" restores the individual widget cursor(s)
 +
  property widgetcursorshape: cursorshapety read fwidgetcursorshape write
 +
                                        fwidgetcursorshape;
 +
 +
  // returns/sets the current application-wide cursor shape ( not "watches" if a waiting dialogue is curerntly displayed ! )
 +
  // or request to set a new cursor shape ( app-wide );
 +
  // doesn't change when changing mouse widgets
 +
  //
 +
  // if called from a non-main app thread & no waiting dialogue displayed then redraws
 +
  // the cursor immediately;
 +
  // set it to "cr_default" to restore the shape to one set by "widgetcursorshape"
 +
  //
 +
  property cursorshape: cursorshapety; // cr_arrow, cr_*
 +
 +
  // assures the displayed mouse cursor shape to be the shape assigned to the currently under-mouse widget,
 +
  // otherwise "cr_default"
 +
  procedure updatecursorshape; //restores cursorshape of mousewidget
 +
 +
  // returns a widget of the application where the mouse is currently positioned over
 +
  property mousewidget: twidget read fmousewidget;
 +
 +
  // returns a widget of the application currently "owning" the mouse ( grabbing all mouse input )
 +
  property mousecapturewidget: twidget read fmousecapturewidget;
 +
 +
 +
  // returns/sets a window to become the main window of the application
 +
  // then resets all other application windows to the window group it belongs to ( Linux only );
 +
  //
 +
  // the main window minimizes all windows if minimized;
 +
  property mainwindow: twindow read fmainwindow write setmainwindow;
 +
 +
  // returns which system thread was allocated to the application on its start
 +
  // ( the main thread )
 +
  property thread: threadty read fthread;
 +
 +
  // returns teh widget where a mouse button click occured last time
 +
  // ( to compare with when determinibg whether another widget is clicked )
 +
  property buttonpresswidgetbefore: twidget read fbuttonpresswidgetbefore;
 +
 +
  // returns teh widget where a mouse button release occured last time
 +
  // ( to compare with when determinibg whether another widget is clicked )
 +
  property buttonreleasewidgetbefore: twidget read fbuttonreleasewidgetbefore;
 +
 +
 +
  // returns/sets the interval of mouse double click recognition ( in microsecs),
 +
  // defaults to 0.4 sec
 +
  property dblclicktime: integer read fdblclicktime write fdblclicktime default
 +
                defaultdblclicktime; //us
 +
 +
// tcustomapplication
 +
 +
  // creates a datamodule instance ( its startup code including "OnLoaded" is executed )
 +
  procedure createdatamodule(instanceclass: msecomponentclassty; var reference);
 +
 +
 +
  // enters the application event loop;
 +
  //
 +
  // once the loop finishes, performs "OnTerminated" for all its subscribers,
 +
  // destroys all application forms ( components & windows )
 +
  procedure run;
 +
 +
  // TRUE if the eventloop is entered
 +
  function running: boolean;
 +
 +
  // returns/sets the application name
 +
  // ( defaults to the full path to application executable in the native OS format );
 +
  // currently, only for informatiion query purposes
 +
  property applicationname: msestring read fapplicationname write fapplicationname;
 +
 
 +
 +
  // if exclusive "rights" are satisfied for the main thread ( a mutex lock is OK )  & the event loop is in progress
 +
  // then posts the "event" to the main application thread for asyc processing,
 +
  // otherwise adds the event to the internal list for further handling as soon as the above conditions meet
 +
  procedure postevent(event: tevent);
 +
 +
  // TRUE if never idle since last call,
 +
  // unlocks the application and calls sleep if not mainthread and asleepus >= 0
 +
  function checkoverload(const asleepus: integer = 100000): boolean;
 +
 +
  // returns/sets the application exception handler
 +
  property onexception: exceptioneventty read fonexception write fonexception;
 +
 +
  // if not "eabort" & no unhandled exceptions,
 +
  // executes the above "OnException" code if assigned
 +
  // or shows an exception message otherwise;
 +
  procedure handleexception(sender: tobject = nil;
 +
                                      const leadingtext: string = '');
 +
 +
  // synchronizes the calling thread with the main event loop ( via a mutex),
 +
  // TRUE if the calling thread allready holds the mutex,
 +
  // the mutex is recursive
 +
  function lock: boolean;
 +
 +
  // tries to synchronize the calling thread with the main event loop ( via a mutex)
 +
  function trylock: boolean;
 +
 +
  // releases the mutex if the calling thread holds the mutex,
 +
  // TRUE if no unlock done
 +
  function unlock: boolean;
 +
 +
  // releases the mutex recursively if the calling thread holds the mutex,
 +
  // returns "count" for the below "relockall"
 +
  function unlockall: integer;
 +
 +
  // regains the mutex to serve "count" locks
 +
  procedure relockall(count: integer);
 +
 +
  // 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,
 +
  // then frees all locks temporarily then posts the event to the app event queue & waits fot it to be processed the resores the locks;
 +
  //
 +
  // TRUE if not aborted, quiet -> shows no exceptions if occurs
 +
  //
 +
  // the "syncronize event" is an event owning a semaphore which can be touched by another thread
 +
  // thus causing "event.waitfo" to return & to exec the event handler code
 +
  //
 +
  function synchronize(const proc: objectprocty;
 +
                      const quite: boolean = false): boolean;
 +
 +
  // TRUE if the calling ( this function ) thread is the application main thread
 +
  function ismainthread: boolean;
 +
 +
  // TRUE if the currently locked thread is the application main thread
 +
  function islockthread: boolean;
 +
 +
  // waith for "athread" to terminate,
 +
  // does "unlock-relock" around waiting
 +
  procedure waitforthread(athread: tmsethread);
 +
 +
  // post a "nothing-to-do" event for asynchronous processing in the main thread
 +
  procedure wakeupmainthread;
 +
 +
  // invalidates all registered forms of the application so that their widgets redraw land-specific captions
 +
  // ( changed by "mseconsts.setlangconsts" ),
 +
  // called internally in "setlangconsts" before return
 +
  procedure langchanged; virtual;
 +
 +
  // returns/sets "aps_terminated" state flag ( no actions ? )
 +
  // this flag is also set internally by "terminate" if not cancelled
 +
  property terminated: boolean read getterminated write setterminated;
 +
 +
  // returns the number of "handleexception" calls having an effect ( a message or the handler code )
 +
  property exceptioncount: longword read fexceptioncount;
 +
 +
 +
private
 +
// function tinternalapplication.beginmodal(const sender: twindow): boolean;
 +
 +
<pre/>
 +
 +
=== DBedit ===
 +
=== DBfields ===
 +
=== Report ===
 +
 +
==== TRepSpacer ====
 +
==== TRecordBand ====
 +
==== TrepValueDisp ====
 +
==== TRepPageNumdisp ====
 +
==== TRepPrintDateDisp ====
 +
==== TBandGroup ====
 +
==== TTileArea ====
 +
  
 
== DB ==
 
== DB ==

Revision as of 00:58, 7 January 2021

English (en)

Widgets

TSimpleWidget

see also Reference:_MSEgui/TSimpleWidget

TMainMenuWidget

TSimpleWidget

TMseFormWidget

Use it in order to insert a tcustomform descendant into another widget at designtime. Does not try to load resources in "create".

TDockFormWidget

TPaintbox

How to draw line (or circle) on tpaintbox? In event onpaint:

 
 procedure tmainfo.paintboxonpaint(const sender: twidget; const canvas: tcanvas); 
 begin 
  with sender,canvas do begin 
   drawline(nullpoint,pointty(size),cl_yellow);  
   //diagonal line across widget 
   drawellipse(makerect(makepoint(bounds_cx div 2,bounds_cy div 2), size),cl_red); 
   //circle (or ellipse) centered in widget                             
  end; 
 end;

Makepoint and makerect are in msegraphutils.

TEventWidget

A 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.

TButton

  • A rectangular clickable area that can show text/bitmap.

- Main properties:

Caption: read/write the text that appear on top of it.
onexecute: read/write the address of a procedure (event handler) to be executed when clicked.

TStockGlyphButton

TRichButton

TLabel

  • Draws a piece of text on the given surface (canvas: screen/printer/bitmap).

- Main properties:

Caption: read/write the piece of text.

See also TLabel

TGroupBox

TStepBox

TStringDisp

  • A read only version of TStringEdit, difference from TLabel: has a frame around it.

-Main properties:

Value: read/write the text that are showed.
Caption: A label normally describing the purpose or meaning of the presented text, it can be positioned around the frame.

TByteStringDisp

TIntegerDisp

TRealDisp

TDateTimeDisp

TBooleanDisp

TToolBar

TDrawGrid

TStringGrid

TTabBar

TTabPage

TTabWidget

TDockHandle

TDockPanel

TSpliter

A widget very similar to "tspacer" but :
- designed to rearrange areas occupied by adjacent widgets
- a linked widget may only enlarge by "eating" the opposite one, so the summary area of both widgets don't change
- has GUI look ( hatched grip, color etc) switched on by default
- facilitates run-time repositioning oneself and linked widgets
- linked widgets may even be other splitters, spacers (with their linked widgets ),..

TSpacer

* a regular widget which creates a kind of positional link between surrounding widgets
* designed to maintain distances between widgets
* may have GUI look, caption etc switched off by default
* resizing a spacer repositions its linked widgets

TLayouter

  • a tspacer descendant designed to (auto)resize or/and move its contained widgets acc to some size/positon dependencies
  • may have GUI look, frame caption etc switched off by default
  • layouters may be nested to achieve copmplex layouts

Each layout change/assignment is divided into performing 3 consequent stages :

Stage 1

Widgets auto resized using the following options:

- if {lao_placex OR lao_placey} :

		= if {plo_scalesize in optionslayout}  then
			* widgets with "osk_nopropwith" unset in their "optionsskin" are h-scaled 
		  	  in the proportion of change of tlayouter's clientwidth
			* widgets with "osk_nopropheight" unset in their "optionsskin" are v-scaled 
		  	  in the proportion  of change of tlayouter's clientheight

			For h-resized layouter, the effect looks like :

		 	 |--Widget__1---Widget__2--|		=> the initial look

		  	 |--Widget_1--Widget_2--|			=> the layouter gets narrower

		  	 |---Widget___1---Widget___2---|	=> the layouter gets wider

			*** both widget sizes & margins are affected ***
			*** Widget_N may generally situate on different y-levels *** 
		  	
	otherwise :

		= if lao_scalewidth in optionslayout :
			* widgets with "osk_nopropwith" unset in their "optionsskin" enters in the mode 
		 	  ( not applied until the layouter resizes! ) when they are h-scaled in the proportion 
		 	  as far as clientwidth of the tlayouter changes, then stages 2 & 3 are reapplied

			For h-resized layouter, the effect looks like :

			  |--Single____widget????|		=> the initial look

			  |--Single__widget???|			=> the layouter gets narrower

			  |--Single_______widget?????|	=> the layouter gets wider

			* also, if {lao_scaleleft in optionslayout} then left margins of the widgets 
			  with unset "optionsskin.osk_nopropleft" resize too otherwise retain

		= if lao_scaleheight in optionslayout :
			* widgets with "osk_nopropheight" unset in their "optionsskin" enters in the mode 
		 	  ( not applied until the layouter resizes! ) when they are v-scaled in the proportion 
		  	  as far as clientheight of the tlayouter changes, then stages 2 & 3 are reapplied

			* also, if {lao_scaletop in optionslayout} then top margins of the widgets 
			  with unset "optionsskin.osk_noproptop" resize too otherwise retain

			*** only widget sizes & margins not distances between them are affected ***

Stage 2

Widgets may be auto resized in 5 consequent steps using the following options:


1. if plo_syncmaxautosize in place_options :
   = all widgets are autosized then their client areas are synchronised to the
     clientareas of the highest and the widest of the widget
   * calls "msegui.syncmaxautosize"

2. if plo_syncpaintwidth in place_options :
   = the paintwidths of all widgets are synchronized to the widget with the
     widest outer frame width ( ex. width of "frame.caption" )
   * mainly makes sense if "lao_alignx" set and {align_glue = wam_start or wam_end}
     ( see below ) when the widgets will be adjusted in order to fit into the
     inner client width of tlayouter:

                                   x-align level           
                                         V                 
                        +----------------------------------+
                        | Widget_1 the_widest_frame_caption|
                        | Widget_2 frame_caption2          |
                        | Widget_N wider_frame_captionN    |
                        +----------------------------------+

   here, the effect is shown for "cp_right" frame captions
     // otherwise syncronizes to the outer ( of the frame except its caption ) width 
     // of the Z-top widget
   * calls "msegui.syncpaintwidth"
   * paintwidth is the outer width

3. if plo_syncpaintheight in place_options :
   = the paintheights of all widgets are synchronized to the widget with the
     highest outer frame width ( ex. width of "frame.caption" ).
   * mainly makes sense if lao_aligny set and {align_glue = wam_start or wam_end}
     ( see below ) the widgets will be adjusted in order to fit into the inner
     client height of tlayouter :

                        +------------------------------+
                        | The_                         |
                        | tallest_            taller_  |
                        | frame_    frame_    frame_   |
                        | caption   caption2  captionN |  
                        |                              |
                        | Widget1   Widget_2  Widget_N |<== y-align level 
                        +------------------------------+     		

  here, the effect is shown for "cp_topleft" frame captions
    // otherwise syncronizes to the outer ( of the frame except its caption ) 
    // height of the Z-top widget
  * calls "msegui.syncpaintheight"
 
4. plo_synccaptiondistx in place_options :
   = causes all widgets to have the widest common room for their cp_(left/right)* frame captions
   * calls "msegui.synccaptiondistx"
 
5. plo_synccaptiondisty in place_options :
   = causes all widgets to have the highest common room for their cp_(top/bottom)* frame captions
   * calls "msegui.synccaptiondisty"

Stage 3

The widgets may be (re)arranged within the layouter.

There're 2 modes of such (re)arrangement which can be partially (orthogonally)
combined (see later):

1) The place(ment) mode ( lao_place* in optionslayout ) :

- widgets are placed at some distances between each other, possibly with some
  margins, rooms of invisible widgets ( having visible=false) are also allocated
  unless "plo_noinvisible in place_options"

  * the widgets are placed in the order of decreasing their "widgetrect.x"
	coordinates before alignment
  
  * the inter-widget distances and the side margins ( if apllied ) in both
	dimentions are identical and limited between "place_mindist" and
	"place_maxdist"
  
  = if {lao_placex in optionslayout} and {place_mode <> wam_none} then the
	following relevant settings apply:
  
	* non-limiting value of "place_maxdist" :
	
		# |Widget_1------Widget_2------Widget_3| 
	
	* non-limiting value of "place_maxdist" and {plo_propmargin in place_options} :
	
		# |---Widget_1---Widget_2---Widget_3---|
		
	* limiting value of "place_maxdist" and {place_mode = wam_start} :
	
		# |Widget_1----Widget_2----Widget_3????|
		
	* limiting value of "place_maxdist" and {place_mode = wam_start} and
	  {plo_propmargin in place_options} :
	
		# |---Widget_1---Widget_2---Widget_3???|
		
	* limiting value of "place_maxdist" and {place_mode = wam_end} :
	
		# |??????Widget_1---Widget_2---Widget_3|
		
	* limiting value of "place_maxdist" and {place_mode = wam_end} and
	  {plo_propmargin in place_options} :
	
		# |???Widget_1---Widget_2---Widget_3---|
		
	* limiting value of "place_maxdist" and {place_mode = wam_center} :
	
		# |???Widget_1---Widget_2---Widget_3???|
		
	* limiting value of "place_maxdist" and {plo_endmargin in place_options} :
	
		# |Widget_1----Widget_2----Widget_____3|, or
		
		# |Widget_1----Widget_____2----Widget_3|, or
		
		# |Widget_____1----Widget_2----Widget_3|, here, the most left amongst
		widgets having both [an_left,an_right] set is expanded otherwise the most
		right widget ( Widget_3 in the example )
		
	* limiting value of "place_maxdist" and {place_mode = wam_end} and
	  {plo_propmargin in place_options} and {plo_endmargin in place_options} :
	  
		# |--Widget_1--Widget_____2--Widget_3--|,
		  
	The Legend:
	===========
	limiting value of "place_maxdist" : such value which produce some visual
	effect on the layouter
	
	  "----" :           distance ( = number of minuses, limited by place_maxdis )
	  "????" :           some remaining space ( = number of questmarks )
	  "Widget_1" :       widget of the original size
	  "Widget__..__1" : (auto)resized widget
  
  = if {lao_placey in optionslayout} and {place_mode <> wam_none} then the things
	are handled in the same manner as with "lao_placex" but for the vertical
	"top2bottom" direction of placement instead of the horizontal "left2right" one.

2) the align(ment) mode ( optionslayout.lao_align* ) :

- widgets are gathered into a visual group to a dedicated "leader" widget of
  the layout ( set by "align_leader" and defaults to the lowest in
  Z-Order = twidget.widgets[0] ) the leader stays in place while the others :

  = if lao_alignx in optionslayout ( the hor alignment mode ):
	  * if align_mode = wam_start :
		snap their left borders to the left border of leader
	  * else if align_mode = wam_end :
		snap their right borders to the right border of leader
	  * else if align_mode = wam_center :
		snap their v-axes to the v-axis of leader after that,
  = if lao_aligny in optionslayout ( the vert alignment mode ):
	  * if align_mode = wam_start :
		snap their top borders to the top border of leader
	  * else if align_mode = wam_end :
		snap their bottom borders to the bottom border of leader
	  * else if align_mode = wam_center :
		snap their h-axes to the h-axis of leader

- after that, the whole widget group can be aligned within the layouter:

  = if align_glue =  wam_start
	  * if lao_alignx in optionslayout:
		the left extent of group snaps to the left border of layouter
	  * if lao_aligny in optionslayout:
		the top extent of group snaps to the top border of layouter
  = else if align_glue = wam_end
	  * if lao_alignx in optionslayout:
		the right extent of group snaps to the right border of layouter
	  * if lao_aligny in optionslayout:
		the bottom extent of group snaps to the bottom border of layouter
  = else if align_glue =  wam_center
	  * if lao_alignx in optionslayout:
		the v-axis of group snaps to the v-axis of layouter
	  * if lao_aligny in optionslayout:
		the h-axis of group snaps to the h-axis of layouter

Mutually exclusive settings:
* only one of "align_mode" can be choosen
* only one of  "glue_mode" can be choosen
* "optionslayout.lao_alignx" & 	"optionslayout.lao_placex"
* "optionslayout.lao_aligny" & 	"optionslayout.lao_placey"

V-alignment ( optionslayout.lao_aligny ) may be combined with h-placement
( optionslayout.lao_placex ), and h-alignment ( optionslayout.lao_alignx ) may
be combined with v-placement ( optionslayout.lao_placey )

NOTE:
  The effects of the above described { resizing / placement / alignment } are
  irreversible. So, the only way to revert is to set "wan_none" then to revert
  manually.

TListView

TImage

TDial

TChart

TChartRecorder

TPolygon

TPickWidget

TOpenglWidget

Edit

TStringEdit

TMemoEdit

THexStringEdit

TDropdownListEdit

A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:
- deo_autodropdown dropdown on keypress
- deo_selectonly don't allow entering arbitrary text.
- deo_forceselect don't allow entering empty text.

THistoryEdit

A tstringedit which shows the previously entered values in a dropdownlist for selection.

TIntegerEdit

TKeyStringEdit

Maps string to string.

TEnumEdit

Maps integer to string, zero based and sequencial (first item 0, next 1, ...).

TEnumTypeEdit

A tenumedit which maps Pascal enums to their names. Use oninit to store the typeinfo pointer of the enum type into sender.typeinfopo.

TSelector

TSelector 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.

TRealEdit

TRealSpinEdit

TDateTimeEdit

TCalendarDateTimeEdit

TEdit

MSEgui counterpart of Delphi TEdit. You will never use it.

TWidgetGrid

TItemEdit

TDropDownItemEdit

A tstringedit with a dropdownlist to choose text values. Important dropdown.options members:
- deo_autodropdown dropdown on keypress
- deo_selectonly don't allow entering arbitrary text.
- deo_forceselect don't allow entering empty text.

TMBDropDownItemEdit

TTreeItemEdit

TRecordFieldEdit

Used in twidgetgrid in order to edit fields of a ttreeitemedit. Example is MSEide projecttreeform.pas.

TDialogStringEdit

A tstringedit with an ellipse button. Use "onexecute" to show the dialog.

TPointerEdit

TSlider

TProgressBar

TBooleanEdit

TBooleanEditRadio

TDataButton

A 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".

TStockGlyphDataButton

TDataIcon

Shows 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.

TTextEdit

Only useful if inserted into a twidgetgrid, builds a text editor, used in MSEide source editor.

TDataImage

A pixmap display widget which can be inserted into twidgetgrid.

TTerminal

Only useful if inserted into a twidgetgrid, builds a very simple terminal emulator. Used in MSEide target console.

NoGui

TActivator

TThreadComp

TStatFile

- so that to be in effect, it should also be assigned to the form where the widget using the stafile is placed on - in design, if "onstatwrite" is set and "filedir" is not yet created, deactivate exception "ECreateError" in project settings ( "Debugger" tab ) - "filedir" may contain "~/" indicating the user's home directory - options "oe_savestate" & "oe_savevalue" of "client" widgets define what to store to the file - position etc changes or/and value changes - 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 - each "tstafile" owns:

= tstatwriter:
  • provides methods of writing sections & statvars to a memory/file stream

- tstatreader:

  • holds list of sections with statvars each
  • provides search & check & reading interface to the statvars
  • provides reading statvars from a memory/file stream

Positioning to a section speeds up accessing its statvars

- there also is "tstatfiler" ( exposed by some "tstatfile" events ) which: = may present or "tstatwriter" or "tstatreader" ( there's a check method ) = provides directionless "update" methods with internal switch to needed direction of processing - "reading" or "writing" statvars on per-section basis

TTimer

TNoGuiAction

TPipeReadercomp

TSysEnvManager

TProcessMonitor

TFilechangeNotifier

Gui

TFaceList

TFrameComp

Terminilogy :
client area = area of the widget which interacts with a user
bevelling = additional facets rising/sinking frame & client area, 
constists of two parts 
- external: between frame and widget
- internal: between frame and client area
frame= flat space between external & internal facets,	floats at the inner level of the external face
* Both frame & bevelling affect the client area ***

TFaceComp

- doesn't affect the widget frame but client area of the frame

TBitmapComp

TImageList

TPopupMenu

TMainMenu

TAction

Shortcut processing order :
- the smallest piece of processing is "doshortcut" procedure which 
is called until processed:
= starting from the sender up to the toplevel widget
= then by all child widgets with non-set "ow_noparentshortcut" 
= then, if "ow_nochildshortcut" isn't set, by the parent widget
= then by the widget oneself
- "doshortcut" is checked in the following order:
= starting from form's main menu
= then from the owning window ( the widget oneself ) 
= then from the application
* A shortcut is bound to a widget by :
- placing an action component on the widget ***
- direct assigning the shortcut to the widget (menus,..)

TShortCutController

TPostscriptPrinter

TGdiPrinter

TWmfPrinter

TSkinController

TGuiThreadComp

Dialog

TFileListview

TFileDialog

TFaceComp

TFileNameEdit

TDirDropdownEdit

TColorEdit

TMemoDialogEdit

TPageSizeSelector

TPageOrientationSelector

Application

TGuiApplication

 tguiapplication = class(tcustomapplication)
  public

   // [re]starts the system timer with the new period and 
   // subscribes the application to be a receiver of the modified "ek_timer" event 
   // ( can check for it in the event queue )
   procedure settimer(const us: integer);

   // finds a window by its winID
   function findwindow(id: winidty; out window: twindow): boolean;

   // finds a window by its ID & adjusts "rect" so that it 
   // fits "bounds_minc*" & "bounds_maxc*" of the found window
   procedure checkwindowrect(winid: winidty; var rect: rectty);

   // inits the timer and "megraphics"
   procedure initialize;

   // frees the allocated system resources (GDI, event subsription, the timer)
   procedure deinitialize;

   // creates a form instance, it will be shown in "application.run"
   procedure createform(instanceclass: widgetclassty; var reference);

   // invalidates all registered forms ( all their widgets will be redrawn )
   procedure invalidate; 
   
   // calls a nested main eventloop, forces processing any pending messages,
   procedure processmessages; override; //handle with care!

   // TRUE if no pending events to process for the application
   function idle: boolean; override;
   
   // requests to indicate waiting ( to show the "watches" cursos )
   procedure beginwait; override;

   // removes the "watches" if no unclosed requests for displaying them,
   // otherwise closes the currently active request
   procedure endwait; override;

   // TRUE if there're unclosed requests for displaying "watches"
   function waiting: boolean;

   // TRUE if ESC has just been pressed
   //  - if all requests for displaying "watches" are closed then refreshes 
   //    the internal list of events ( the GUI-queue -> the app event list)
   function waitescaped: boolean; //true if escape pressed while waiting

   // sets state of the current wait dialogue ( but doesn't close one ) to undefined
   procedure resetwaitdialog;   

   // runs "aexecuteaction" in the main thread in OnIdle mode,
   // then shows a cancellable message,
   // if the one is cancelled then runs "acancelaction" then 
   // either fully clears (if exceptions occur ) 
   // or terminates the execution otherwise,
   // true if not cancelled;
   // "application.processmessages" must be called regularly if "aexecuteaction" is used here,
   // alternatively "aidleaction" can be used, call sleep ( some time ) in order to minimize
   // processor load. 
   // If athread <> nil the function starts and terminates the thread    
   function waitdialog(const athread: tthreadcomp = nil; const atext: msestring = ;
                   const caption: msestring = ;
                   const acancelaction: notifyeventty = nil;
                   const aexecuteaction: notifyeventty = nil): boolean; override;

   // closes the currently modal waitdialogue with "cancelled" state
   procedure cancelwait;

   // closes the currently modal waitdialogue with "ok" state
   procedure terminatewait;

   function waitstarted: boolean;   // the last waitdialogue is currently showing for some requests
   function waitcanceled: boolean;  // the last waitdialogue has been cancelled for some request (but can be shown fot others ?)
   function waitterminated: boolean; // the last waitdialogue has been terminated for some request (but can be shown fot others ?) 

   // if called from the main app thread then shows as a modal message describing the exception 
   // otherwise posts an async event for which the message will be called
   procedure showexception(e: exception; const leadingtext: string = ); override;

   // posts an async event for which the message describing the exception will be called
   procedure showasyncexception(e: exception; const leadingtext: string = );

   // "application.errormessage" shows standard error message ( with "ERROR" title ) 
   procedure errormessage(const amessage: msestring); override;

   // [re]calculates timings & position of hint for "ahintedwidget"
   // if "ow_timedhint" in "ahintedwidget.foptionswidget" then iys showtime will be 
   // "defaulthintshowtime" ( an app wide setting, 3sec by default)   
   procedure inithintinfo(var info: hintinfoty; const ahintedwidget: twidget);


   // shows the supplied hint text within "aposrect" with alignment "aplacement" during "ashowtime",
   // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove   
   procedure showhint(const sender: twidget; const hint: msestring;
              const aposrect: rectty; const aplacement: captionposty = cp_bottomleft;
              const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
                 // -1 defaultshowtime if ow_timedhint in sender.optionswidget
              const aflags: hintflagsty = defaulthintflags
                      ); overload;

   // shows the supplied hint text at left-top position"apos" during "ashowtime",
   // the avail ( but not used currenly ) flags are : hfl_show,hfl_custom,hfl_noautohidemove,hfl_noautohidemove   
   procedure showhint(const sender: twidget; const hint: msestring;
              const apos: pointty;
              const ashowtime: integer = defaulthintshowtime; //0 -> inifinite,
                 // -1 defaultshowtime if ow_timedhint in sender.optionswidget
              const aflags: hintflagsty = defaulthintflags
                      ); overload;

   // shows the hint fully defined in "info" for the widget "sender"
   procedure showhint(const sender: twidget; const info: hintinfoty); overload;

   // removes the current hint widget & frees its resources & stops its stop timer
   procedure hidehint;

   // restarts the current hint and its stop timer
   procedure restarthint(const sender: twidget);

   function hintedwidget: twidget; //last hinted widget
   function activehintedwidget: twidget; //nil if no hint active

   // returns helpcontext of active widget,  if none;   
   function activehelpcontext: msestring;

   // returns helpcontext of the widget under mouse,  if none;
   function mousehelpcontext: msestring;

   // TRUE if one of the app's window/console is in input focus
   function active: boolean;

   // returns the desktop resolution ( or the virtual one if used )
   function screensize: sizety;

   // returns the (virtual) desktop resolution except the tray area,
   // nil -> current active window
   function workarea(const awindow: twindow = nil): rectty;

   // returns which application window ( a form not an eventwidget, an openglwidget or a windowwidget !) 
   // is active ( provides the input focus ),
   // it's same for all widgets of the form served by this window
   function activewindow: twindow;

/ * A transient window is a descendant of ( "transientfor" ) another window in the stacking order hierarchy */

   // returns a first non-transient ( on top of the app stacking order ) window upward 
   // from the currently active window of the application.
   // or that active window if no such
   function regularactivewindow: twindow;

   // same as "activewindow" but the window must not be released (?)
   function unreleasedactivewindow: twindow;

   // returns the focused widget of the currently active window if one exists
   function activewidget: twidget;

   // returns the widget presenteing the currently active window
   function activerootwidget: twidget;
   
   // returns the window ( not hidden or disabled !) under the screen point "pos"
   function windowatpos(const pos: pointty): twindow;

   // puts to "awidget" the container of widget pointed by "namepath"
   // ( finalizing "." is discarded if found ) ,
   // FALSE if not found, and NIL and TRUE if "namepath" = 
   function findwidget(const namepath: string; out awidget: twidget): boolean;

   // rebuilds the application's window list accorrding to the current on-screen Z-order of its windows;
   // window list is ordered by "z" - bottom first & top last;
   // invisibles first
   procedure sortzorder;

   // returns a copy of the internal window list of application
   function windowar: windowarty;

   // returns the list of application window winIDs
   function winidar: winidarty;

   // returns the count of the application windows    
   function windowcount: integer;

   // returns the window by its number ( "index" >= 0) in the application window list
   property windows[const index: integer]: twindow read getwindows;

   // returns the lowest visible window in stackorder, 
   // calls "sortzorder" within
   function bottomwindow: twindow;

   // returns the highest visible window in stackorder, 
   // calls "sortzorder" within
   function topwindow: twindow;


   // TRUE if all owned windows pass "CanClose" check or 
   // don't have focused widgets
   function candefocus: boolean;

   // subscribes the handler "method" to receive keyboard events
   procedure registeronkeypress(const method: keyeventty);

   // unsubscribes the handler "method" from receiving keyboard events
   procedure unregisteronkeypress(const method: keyeventty);

   // subscribes the handler "method" to receive shortcut events
   procedure registeronshortcut(const method: keyeventty);

   // unsubscribes the handler "method" from receiving shortcut events
   procedure unregisteronshortcut(const method: keyeventty);

   // subscribes the handler "method" to receive "OnWindowActiveChanged" event ( form-wide )
   procedure registeronactivechanged(const method: activechangeeventty);

   // unsubscribes the handler "method" from receiving "OnWindowActiveChanged" event ( form-wide )
   procedure unregisteronactivechanged(const method: activechangeeventty);

   // subscribes the handler "method" to receive "OnDestroyed" events ( form-wide )
   procedure registeronwindowdestroyed(const method: windoweventty);

   // unsubscribes the handler "method" from receiving "OnDestroyed" events ( form-wide )
   procedure unregisteronwindowdestroyed(const method: windoweventty);

   // subscribes the handler "method" to receive "OnWindowDestroyed" events ( form-wide )
   procedure registeronwiniddestroyed(const method: winideventty);

   // unsubscribes the handler "method" form receiving "OnWindowDestroyed" events ( form-wide )
   procedure unregisteronwiniddestroyed(const method: winideventty);

   // subscribes the handler "method" to receive "ApplicationActiveChanged" events ( form-wide )
   procedure registeronapplicationactivechanged(const method: booleaneventty);

   // unsubscribes the handler "method" from receiving "ApplicationActiveChanged" events ( form-wide )
   procedure unregisteronapplicationactivechanged(const method: booleaneventty);

// tcustomapplication

   // subscribes the handler "method" to receive "OnTerminated" event ( form-wide )
   procedure registeronterminated(const method: notifyeventty);

   // unsubscribes the handler "method" from receiving "OnTerminated" events ( form-wide )
   procedure unregisteronterminated(const method: notifyeventty);

   // subscribes the handler "method" to receive "OnTerminateQuery" event ( form-wide )
   procedure registeronterminate(const method: terminatequeryeventty);

   // unsubscribes the handler "method" from receiving "OnTerminateQuery" event ( form-wide )
   procedure unregisteronterminate(const method: terminatequeryeventty);

   // subscribes the handler "method" to receive "OnIdle" event ( form-wide )
   procedure registeronidle(const method: idleeventty);

   // unsubscribes the handler "method" from receiving "OnIdle" events ( form-wide )
   procedure unregisteronidle(const method: idleeventty);

   // calls "canclose" of all application windows except the "sender" window 
   // if all "canclose"are TRUE then checks "OnTerminateQuery" 
   // for all its subscribers ( usually forms of the application )
   procedure terminate(const sender: twindow = nil); 

   // TRUE as long as a "terminate" call is in progress
   function terminating: boolean;

   // TRUE as long as a "deinitialize" call is in progress
   function deinitializing: boolean;
   
   // returns the current caret object ( the text input focus indicator ) of the application
   / ( this object provides facitities to control position & appearance & visibility & timings of the caret )
   property caret: tcaret read fcaret;

   // returns the current mouse object of the application
   / ( this object provides facitities to control position & appearance of the mouse )   
   property mouse: tmouse read fmouse;

   // simulates mouseparkevent 
   // ( an adjusting mouse movement without user intervention - grid snapping, docking etc ?)
   procedure mouseparkevent;

   // sets mouse position correction for further mouse events,
   // the real position is less the visual one by the supplied shift
   procedure delayedmouseshift(const ashift: pointty);

   // returns/sets a cursor shape used for widgets having their cursor shape set to "cr_default";
   // setting it to "cr_default" restores the individual widget cursor(s)
   property widgetcursorshape: cursorshapety read fwidgetcursorshape write
                                        fwidgetcursorshape;

   // returns/sets the current application-wide cursor shape ( not "watches" if a waiting dialogue is curerntly displayed ! )
   // or request to set a new cursor shape ( app-wide );
   // doesn't change when changing mouse widgets
   // 
   // if called from a non-main app thread & no waiting dialogue displayed then redraws 
   // the cursor immediately;
   // set it to "cr_default" to restore the shape to one set by "widgetcursorshape"
   //
   property cursorshape: cursorshapety; // cr_arrow, cr_*

   // assures the displayed mouse cursor shape to be the shape assigned to the currently under-mouse widget,
   // otherwise "cr_default" 
   procedure updatecursorshape; //restores cursorshape of mousewidget

   // returns a widget of the application where the mouse is currently positioned over
   property mousewidget: twidget read fmousewidget;

   // returns a widget of the application currently "owning" the mouse ( grabbing all mouse input )
   property mousecapturewidget: twidget read fmousecapturewidget;


   // returns/sets a window to become the main window of the application
   // then resets all other application windows to the window group it belongs to ( Linux only );
   //
   // the main window minimizes all windows if minimized;
   property mainwindow: twindow read fmainwindow write setmainwindow;

   // returns which system thread was allocated to the application on its start
   // ( the main thread )
   property thread: threadty read fthread;

   // returns teh widget where a mouse button click occured last time 
   // ( to compare with when determinibg whether another widget is clicked )
   property buttonpresswidgetbefore: twidget read fbuttonpresswidgetbefore;

   // returns teh widget where a mouse button release occured last time 
   // ( to compare with when determinibg whether another widget is clicked )
   property buttonreleasewidgetbefore: twidget read fbuttonreleasewidgetbefore;


   // returns/sets the interval of mouse double click recognition ( in microsecs),
   // defaults to 0.4 sec
   property dblclicktime: integer read fdblclicktime write fdblclicktime default
                 defaultdblclicktime; //us

// tcustomapplication

   // creates a datamodule instance ( its startup code including "OnLoaded" is executed )
   procedure createdatamodule(instanceclass: msecomponentclassty; var reference);


   // enters the application event loop;
   //
   // once the loop finishes, performs "OnTerminated" for all its subscribers,
   // destroys all application forms ( components & windows )
   procedure run;

   // TRUE if the eventloop is entered
   function running: boolean;

   // returns/sets the application name 
   // ( defaults to the full path to application executable in the native OS format );
   // currently, only for informatiion query purposes
   property applicationname: msestring read fapplicationname write fapplicationname;
   

   // if exclusive "rights" are satisfied for the main thread ( a mutex lock is OK )  & the event loop is in progress 
   // then posts the "event" to the main application thread for asyc processing,
   // otherwise adds the event to the internal list for further handling as soon as the above conditions meet
   procedure postevent(event: tevent);

   // TRUE if never idle since last call,
   // unlocks the application and calls sleep if not mainthread and asleepus >= 0
   function checkoverload(const asleepus: integer = 100000): boolean;

   // returns/sets the application exception handler
   property onexception: exceptioneventty read fonexception write fonexception;

   // if not "eabort" & no unhandled exceptions, 
   // executes the above "OnException" code if assigned 
   // or shows an exception message otherwise;
   procedure handleexception(sender: tobject = nil; 
                                       const leadingtext: string = );

   // synchronizes the calling thread with the main event loop ( via a mutex),
   // TRUE if the calling thread allready holds the mutex,
   // the mutex is recursive
   function lock: boolean;

   // tries to synchronize the calling thread with the main event loop ( via a mutex)
   function trylock: boolean;

   // releases the mutex if the calling thread holds the mutex,
   // TRUE if no unlock done
   function unlock: boolean;

   // releases the mutex recursively if the calling thread holds the mutex,
   // returns "count" for the below "relockall"
   function unlockall: integer;

   // regains the mutex to serve "count" locks
   procedure relockall(count: integer);

   // 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, 
   // then frees all locks temporarily then posts the event to the app event queue & waits fot it to be processed the resores the locks;
   // 
   // TRUE if not aborted, quiet -> shows no exceptions if occurs
   //
   // the "syncronize event" is an event owning a semaphore which can be touched by another thread 
   // thus causing "event.waitfo" to return & to exec the event handler code
   //
   function synchronize(const proc: objectprocty;
                       const quite: boolean = false): boolean;

   // TRUE if the calling ( this function ) thread is the application main thread
   function ismainthread: boolean;

   // TRUE if the currently locked thread is the application main thread
   function islockthread: boolean;

   // waith for "athread" to terminate,
   // does "unlock-relock" around waiting
   procedure waitforthread(athread: tmsethread);

   // post a "nothing-to-do" event for asynchronous processing in the main thread 
   procedure wakeupmainthread;

   // invalidates all registered forms of the application so that their widgets redraw land-specific captions 
   // ( changed by "mseconsts.setlangconsts" ),
   // called internally in "setlangconsts" before return
   procedure langchanged; virtual;

   // returns/sets "aps_terminated" state flag ( no actions ? )
   // this flag is also set internally by "terminate" if not cancelled
   property terminated: boolean read getterminated write setterminated;

   // returns the number of "handleexception" calls having an effect ( a message or the handler code )
   property exceptioncount: longword read fexceptioncount;


private
 // function tinternalapplication.beginmodal(const sender: twindow): boolean;


DBedit

DBfields

Report

TRepSpacer

TRecordBand

TrepValueDisp

TRepPageNumdisp

TRepPrintDateDisp

TBandGroup

TTileArea

DB

DBedit

DBfields

Report

TRepSpacer

TRecordBand

TrepValueDisp

TRepPageNumdisp

TRepPrintDateDisp

TBandGroup

TTileArea

Design

TGdbMi

TSyntaxEdit

TSyntaxPainter

Comm

TCommPort

TAsciiCommPort

TAsciiProtPort

TCommSelector