.comment-link {margin-left:.6em;}

Monday, August 20, 2007

 

twolvisualcontrol

TWOLVisualControl object
Unit: WOLGUI01.
Descendant of TWOLBase. Used in the visual object creation.

Public Methods and Events.

constructor Create (AOwner: TWOLRoot); override;

destructor Destroy; override;

procedure Repaint; virtual;
Used to force a redesign of a window object.

procedure Load; override;

function IsPaintMsg (const Message: TWOLMessage): Boolean; virtual;
Used to verify if the last message is painted on the window object.

procedure UpdateBounds; virtual;
Used to bring up to date the values of the dimension rectangle of a window object.

function IsControlMouseMsg (to var Message: TWOLMessage): Boolean;
Used to verify if the last mouse message went to the chosen window object.

procedure RemoveControl (Ctrl: TWOLBase); virtual;
Used to remove a window object the list of children from its root.

procedure InsertControl (Position: TWOLSmallInt; Ctrl: TWOLBase); virtual;
Used to insert an object of window in the list of its object father or owner.

function FindTabControl (Ctrl: TWOLVisualControl; to aTabOrder: TWOLInteger; GoNext: Boolean): TWOLVisualControl;
Used to look one definitive control in the tabulação order. If it will not be found, returns nil.

function SelectTabControl (Ctrl: TWOLVisualControl; GoNext: Boolean): Boolean;
Used to select a following or previous visual object to the current one with regard to the tab.

procedure AlignChildren (theRect: TWOLRect); virtual;
Used to line up the children of the visual object for its area or the area determined for theRect.

function Broadcast (to var Message): Boolean; virtual;
Used to send a message to all the visual objects children. If one of them processes the message, the return value will be True.

procedure CreateGUIParams (to var aParams: TWOLParams; const wClass: TWOLClassType); virtual;
Used to communicate between the kernel of the GUI and to return the native styles for a class. These styles will go to determine the behavior and the appearance of the window object.

procedure CreateWnd (to var aParams: TWOLParams); virtual;
Used to interact with kernel to effectively create the window with the resources of the GUI.

procedure DestroyWnd; virtual;
Used to destroy the window of the visual object. It does not destroy the object in memory.

procedure RecreateWnd; virtual;
Used to recreate the window of the visual object. Many times, a style change style requires the recreation of a window to reflect the new behavior and/or appearance.

function DefaultProc (to var Message: TWOLMessage): TWOLLongint; override;

procedure SetFocus; virtual;
Used to give attention of the keyboard to the selected window object. Not all the window objects can manipulate the keyboard.

function FindControl (aHandle: TWOLHandle): TWOLVisualControl; virtual;
Used to find a window object from its window number or handle.

function FindControlByName (aName: String): TWOLVisualControl; virtual;
Used to find an window object from its name.

procedure ScrollBy (DeltaX, DeltaY: TWOLSmallInt);
Used to sroll in any direction the window position of an object. Negative numbers indicate to the top and to the left. (0,0 would indicate the center)

function SendMessage (to var Msg: TWOLMessage): TWOLSmallInt; override;

function PostMessage (Msg: TWOLCardinal; WParam: TWOLCardinal; LParam: TWOLCardinal): TWOLCardinal; override;

procedure ReleaseMouse; virtual;
Used to free the mouse when it is captured by a window object.

procedure CaptureMouse; virtual;
Used so that a window object captures the cursor of mouse. An object that has mouse captured receives exclusive messages from mouse.

procedure Refresh; virtual;
Used to repaint the object window.

procedure HandleNeeded; virtual;
Used to create one handle for the window object. This procedure verifies if the object has a handle different than zero. In the case that it does not have one, it calls CreateWnd.

procedure Hide; virtual;
Used to hide a window object. A hidden window object does not receive messages.

procedure Show; virtual;
Used to show a window object.

procedure Redraw; virtual;
Used to redraw an object window and its children.

procedure DrawDesignFocus; virtual;
Used in time of project to draw the focus rectangle window object that is being currently manipulated.

function ClientToScreen (Point: TWOLPoint): TWOLPoint;
Used to convert a point of the co-ordinated object onto the screen window.

function ScreenToClient (Point: TWOLPoint): TWOLPoint;
Used to convert a point of the screen to the object window.

function PointInBounds (Point: TWOLPoint): Boolean; virtual;
Used to verify if a point it is contained in the area of the object window.

procedure BringToFront;
Used to bring the object of window to the front of all the others.

procedure SendToBack;
Used to send the window object to the back.

procedure OrderByTopLeft;
Used to command the creation and list of objects based in its positions.

procedure AllocResources; override;

procedure FreeResources; override;

function GetParentForm: TWOLForm;
Used to return the parent form of the visual object.

function isUniqueName (const S: String): Boolean;
Used to verify that the name of a window is unique.

function WndPaint (to var Message: TWOLMessage): Boolean; override;

function WndKeyboard (to var Message: TWOLMessage): Boolean; override;

function WndMouse (to var Message: TWOLMessage): Boolean; override;

function WndNotify (to var Message: TWOLMessage): Boolean; override;

function WndCommand (to var Message: TWOLMessage): Boolean; override;

function WndProc (to var Message: TWOLMessage): Boolean; override;

function WndText (to var Message: TWOLMessage): Boolean; override;


Properties and Events of the Object:

Controls [Index: TWOLSmallInt]: TWOLBase (Only for Reading)
Index returns the object index, based on the creation order.

Focused: Boolean (Only for Reading)
It indicates if the window object has the focus of keyboard or not.

Brush: TWOLBrush (For Reading and Writing)
Brush associated to the object window.

Font: TWOLFont (For Reading and Writing)
Font associated to the window object.

Canvas: TWOLCanvas (Only for Reading)
Canvas associated to the window.

Ctrl3D: Boolean (For Reading and Writing)
It indicates if the window object has a 3d appearance or not.

Handle: TWOLHandle (Only for Reading)
It indicates the handle number of the window object.

ControlCount: TWOLSmallInt (Only for Reading)
It indicates the amount of contained objects in the current object window.

TabOrder: TWOLInteger (For Reading and Writing)
It indicates the order of tabs in the object window. If it does not have an order, the value is -1.This property only effects objects that can receive messages from the keyboard.

TabStop: Boolean (For Reading and Writing)
It indicates in the window object the breakpoint of the tabs. If an object cannot receive focus from the keyboard, this value will be False.

Color: TWOLColor (For Reading and Writing)
It indicates the value of the color of a window object. The color is always in format RGB.

Border: TWOLBorderSet (For Reading and Writing)
It indicates the type of edge that the window object must have.

WindowAlign: TWOLWinAlign (For Reading and Writing)
It indicates the type of alignment that the window object must have.

OnHide: TWOLEvent (For Reading and Writing)
Event when the window object is hidden.

OnShow: TWOLEvent (For Reading and Writing)
Event when the window object is visible.

OnEnter: TWOLEvent (For Reading and Writing)
Event when the window object receives focus from the keyboard.

OnExit: TWOLEvent (For Reading and Writing)
Event when the window object loses Keyboard focus.

OnResize: TWOLEvent (For Reading and Writing)
Event when the window object has it's dimensions modified.

OnKeyPress: TWOLKeyEvent (For Reading and Writing)
Event when the keyboard is set in motion for the window object with focus.

OnCtlColor: TWOLMsgEvent (For Reading and Writing)
Event when a window object needs to be painted. This painting differs from the one of the Paint, since only the color can be modified.

OnPaint: TWOLMsgEvent (For Reading and Writing)
Event when the window object is sent a paint message. In this in case that any thing in the object can be drawn.

OnPaintBkG: TWOLMsgEvent (For Reading and Writing)
Event when the background needs to be drawn.

OnPaintBrd: TWOLMsgEvent (For Reading and Writing)
Event when the edge of the window object needs to be painted. Nor all GUI allows the edge either spotted.

Labels: ,


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?