VGDD:ContextHelp VGDDScreen

From VirtualFabWiki
Jump to: navigation, search

Screen

MasterScreens

This property lets you specify which Master Screens to use as base for your screen. Multiple MasterScreens can be overlayed to obtain maximum flexibility in your GUI design.


IsMasterScreen

This property lets you promote a normal Screen to Master Screen to be used as base for your other screens.


ShowMasterScreens

This is a VGDD Design-time-only property: when using MasterScreens it can be useful to temporarily hide them and show only Widgets that are placed on the currently edited Screen. To do this, set it to False. By resetting it to True, VGDD will display the screen as it will be on the real TFT, with the MasterScreen(s) layered in the background.


GolFree

By default the generated code for creating a screen will include a call to GOLFree() function in order to free memory allocated by previous screens. This way the heap doesn't get fragmented and is generally a best practice with GOL.

But if you want to overlay Widgets on an existing screen, keeping the previous Widgets 'alive', such call shouldn't be done. This is accomplished by setting this property to false


Overlay

Setting this property to true inhibits clearing the screen when creating it. In combination with GolFree this lets you overlay two screens in one.


TransparentColour

Setting this property to a colour will enable Transparency

VGDDEvents

Also Screens have their Events that allow your code to execute in specific moments:

SCREEN_BEFORE_CREATE

Triggers just before the call to xxCreate which performs object creation. Here you can put preparation code, such setting strings to be displayed

SCREEN_AFTER_CREATE

Happens just after objects have been created, but still have to be displayed by GOL. Actually the primitives (Line, Circle, etc.) are already on screen at this moment

SCREEN_UPDATE

Happens once, after all Widgets have been drawn.

SCREEN_DISPLAY

The code in this event is executed continuously while the screen is displayed. It's the perfect place to put code that keeps the display in synch with data taken from the outside.