![]() TGE Version 1.5.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GuiCanvas Class Reference#include <guiCanvas.h>
Inheritance diagram for GuiCanvas: ![]() Detailed DescriptionA canvas on which rendering occurs.
What a GUICanvas Can Contain...Content ControlA content control is the top level GuiControl for a screen. This GuiControl will be the parent control for all other GuiControls on that particular screen.DialogsA dialog is essentially another screen, only it gets overlaid on top of the current content control, and all input goes to the dialog. This is most akin to the "Open File" dialog box found in most operating systems. When you choose to open a file, and the "Open File" dialog pops up, you can no longer send input to the application, and must complete or cancel the open file request. Torque keeps track of layers of dialogs. The dialog with the highest layer is on top and will get all the input, unless the dialog is modeless, which is a profile option.
Dirty RectanglesThe GuiCanvas is based on dirty regions.Every frame the canvas paints only the areas of the canvas that are 'dirty' or need updating. In most cases, this only is the area under the mouse cursor. This is why if you look in guiCanvas.cc the call to glClear is commented out. If you want a really good idea of what exactly dirty regions are and how they work, un-comment that glClear line in the renderFrame method of guiCanvas.cc What you will see is a black screen, except in the dirty regions, where the screen will be painted normally. If you are making an animated GuiControl you need to add your control to the dirty areas of the canvas.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
Repaints the dirty regions of the canvas.
Reimplemented in GuiEffectCanvas.
Repaints the entire canvas by calling resetUpdateRegions() and then renderFrame().
Adds a dirty area to the canvas so it will be updated on the next frame.
Resets the update regions so that the next call to renderFrame will repaint the whole canvas.
Resizes the content control to match the canvas size.
This builds a rectangle which encompasses all of the dirty regions to be repainted.
This will swap the buffers at the end of renderFrame. It was added for canvas sub-classes in case they wanted to do some custom code before the buffer flip occured.
This sets the content control to something different.
Reimplemented in GuiEffectCanvas.
Returns the content control.
Adds a dialog control onto the stack of dialogs.
Removes a specific layer of dialogs.
Removes a specific dialog control.
This turns on/off front-buffer rendering.
Sets the cursor for the canvas.
Returns true if the cursor is on.
Turns the cursor on or off.
Sets the position of the cursor.
Returns the point, in screenspace, at which the cursor is located.
Enable/disable rendering of the cursor.
Returns true if the cursor is being rendered.
used by the tooltip resource
Processes a mouse movement event.
When a control gets the mouse lock this means that that control gets ALL mouse input and no other control recieves any input.
Reimplemented from GuiControl.
Unlocks the mouse from a control.
Returns the control which the mouse is over.
Returns the control which the mouse is locked to if any.
Returns true if the left mouse button is down.
Returns true if the right mouse button is down.
Moves the first responder to the next tabable controle.
Moves the first responder to the previous tabable control.
Setups a keyboard accelerator which maps to a GuiControl.
Sets the first responder.
Reimplemented from GuiControl.
Field Documentation
This is the scale factor which relates mouse movement in pixels (one unit of mouse movement is a mickey) to units in the GUI.
All mouse events will go to this ctrl only.
the control the mouse was last seen in unless some other one captured it
whether the current ctrl has been clicked - used by helpctrl
this determines how long the mouse has been in the same control
used for onMouseRepeat()
also used for onMouseRepeat()
Flag to determine if the button is depressed.
bool to determine if the right button is depressed
Middle button flag.
All keyboard events will go to this ctrl first.
|