OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Package Functions | Package Attributes | Properties | Events | List of all members
OmegaGUI.Model.Dialog Class Reference

An XML-serializable dialog view More...

Inheritance diagram for OmegaGUI.Model.Dialog:

Public Member Functions

override string ToString ()
 
ICollection< ControlPickControls (Rectangle area)
 Finds Controls within a certain area More...
 
void MsgBox (string text, MsgBoxType type, Action< MsgBoxResult > callback)
 
Dialog Clone ()
 Creates a deep copy of this dialog. You need to call GenerateRender on it before it can be used for rendering. More...
 

Static Public Member Functions

static Dialog FromContent (string id)
 Loads a dialog from an XML file via the ContentManager. More...
 

Public Attributes

XColor ColorBackground = true
 Used for XML serialization. More...
 
bool TextureFileValid => !string.IsNullOrEmpty(_textureFile) && ContentManager.FileExists("GUI/Textures", _textureFile)
 
float EffectiveScale => _scale * _autoScale
 The effective scale resulting from the user-defined and automatic scaling to fullscreen More...
 
Collection< ButtonStyleButtonStyles => _buttonStyles
 A list of all custom button styles available in the dialog More...
 
BindingList< ControlControls => _controls
 A list of all controls on the dialog More...
 

Package Functions

string GetLocalized (string value)
 Returns the localized version of a string if available More...
 
Render.Dialog GenerateRender (DialogManager manager)
 Generates a real dialog model from this XML-representation More...
 
void RaiseEvent (string script, string source)
 Executes a script to handle an event More...
 
ButtonStyle GetButtonStyle (string name)
 Gets the ButtonStyle with the specified name More...
 

Package Attributes

Render.Dialog DialogRender
 The Render.Dialog used for actual rendering More...
 
uint CustomTexture = 1
 ToDo: Document More...
 

Properties

static CultureInfo ResourceCulture [get, set]
 The culture used for loading the assembly resources More...
 
bool NeedsUpdate [get, set]
 A flag to determine whether the model counterpart to this dialog vuew needs to be recreated to reflect changes made to properties More...
 
string CaptionText [get, set]
 The caption text displayed at the top of this dialog More...
 
int CaptionHeight [get, set]
 The height of caption displayed at the top of this dialog More...
 
bool Animate [get, set]
 Shall this dialog use animations? More...
 
Color BackgroundColor [get, set]
 The dialog's background color More...
 
Color CaptionColor [get, set]
 The dialog's caption bar color More...
 
Color TextColor [get, set]
 The color of text on the dialog - no auto-update More...
 
string OnShow [get, set]
 A script to be run when the dialog is first shown More...
 
string OnUpdate [get, set]
 A script to be run after the dialog was first shown and whenever it needs to update its output More...
 
string TextureFile [get, set]
 The file containing the texture for controls on this dialog - no auto-update More...
 
string FontName [get, set]
 The name of font for text on controls - no auto-update More...
 
uint FontSize [get, set]
 The font size More...
 
Size Size [get, set]
 The initial size of the dialog, used for auto-scaling fullscreen dialogs - no auto-update More...
 
Point Shift [get, set]
 A set of coordinates by which all control positions are shifted More...
 
float Scale [get, set]
 A factor by which all sizes are multiplied, is ignored in fullscreen mode More...
 
float AutoScale [get, set]
 An automatically calculated scale factor that is multiplied with the manual value More...
 
bool Fullscreen [get, set]
 Shall this dialog be auto-scaled to fill the complete screen? - no auto-update More...
 
bool Visible [get, set]
 Is this dialog currently visible? More...
 
Control this[string name] [get]
 Gets the first Control in this Dialog with the specified name More...
 

Events

ScriptExecution ScriptFired
 Occurs whenever one of the controls fires a script More...
 

Detailed Description

An XML-serializable dialog view

Member Function Documentation

Dialog OmegaGUI.Model.Dialog.Clone ( )
inline

Creates a deep copy of this dialog. You need to call GenerateRender on it before it can be used for rendering.

Returns
The cloned dialog.
static Dialog OmegaGUI.Model.Dialog.FromContent ( string  id)
inlinestatic

Loads a dialog from an XML file via the ContentManager.

Parameters
idThe ID of the file to load from
Returns
The loaded dialog
Render.Dialog OmegaGUI.Model.Dialog.GenerateRender ( DialogManager  manager)
inlinepackage

Generates a real dialog model from this XML-representation

Parameters
managerThe DialogManager instance that provides the resources for rendering of this dialog
Returns
The generated dialog model
ButtonStyle OmegaGUI.Model.Dialog.GetButtonStyle ( string  name)
inlinepackage

Gets the ButtonStyle with the specified name

Returns
The requested ButtonStyle or null if it couldn't be found
string OmegaGUI.Model.Dialog.GetLocalized ( string  value)
inlinepackage

Returns the localized version of a string if available

Parameters
valueThe value to localize
Returns
The localized value or the original value
ICollection<Control> OmegaGUI.Model.Dialog.PickControls ( Rectangle  area)
inline

Finds Controls within a certain area

Parameters
areaThe coordinate area to look in
Returns
A list of all Controls with the area .
void OmegaGUI.Model.Dialog.RaiseEvent ( string  script,
string  source 
)
inlinepackage

Executes a script to handle an event

Parameters
scriptThe script to be executed
sourceFrom where the script is being called
See Also
ScriptFired

Member Data Documentation

Collection<ButtonStyle> OmegaGUI.Model.Dialog.ButtonStyles => _buttonStyles

A list of all custom button styles available in the dialog

XColor OmegaGUI.Model.Dialog.ColorBackground = true

Used for XML serialization.

BindingList<Control> OmegaGUI.Model.Dialog.Controls => _controls

A list of all controls on the dialog

uint OmegaGUI.Model.Dialog.CustomTexture = 1
package

ToDo: Document

Render.Dialog OmegaGUI.Model.Dialog.DialogRender
package

The Render.Dialog used for actual rendering

float OmegaGUI.Model.Dialog.EffectiveScale => _scale * _autoScale

The effective scale resulting from the user-defined and automatic scaling to fullscreen

Property Documentation

bool OmegaGUI.Model.Dialog.Animate
getset

Shall this dialog use animations?

float OmegaGUI.Model.Dialog.AutoScale
getsetpackage

An automatically calculated scale factor that is multiplied with the manual value

Color OmegaGUI.Model.Dialog.BackgroundColor
getset

The dialog's background color

Color OmegaGUI.Model.Dialog.CaptionColor
getset

The dialog's caption bar color

int OmegaGUI.Model.Dialog.CaptionHeight
getset

The height of caption displayed at the top of this dialog

string OmegaGUI.Model.Dialog.CaptionText
getset

The caption text displayed at the top of this dialog

string OmegaGUI.Model.Dialog.FontName
getset

The name of font for text on controls - no auto-update

uint OmegaGUI.Model.Dialog.FontSize
getset

The font size

bool OmegaGUI.Model.Dialog.Fullscreen
getset

Shall this dialog be auto-scaled to fill the complete screen? - no auto-update

bool OmegaGUI.Model.Dialog.NeedsUpdate
getset

A flag to determine whether the model counterpart to this dialog vuew needs to be recreated to reflect changes made to properties

string OmegaGUI.Model.Dialog.OnShow
getset

A script to be run when the dialog is first shown

string OmegaGUI.Model.Dialog.OnUpdate
getset

A script to be run after the dialog was first shown and whenever it needs to update its output

CultureInfo OmegaGUI.Model.Dialog.ResourceCulture
staticgetset

The culture used for loading the assembly resources

float OmegaGUI.Model.Dialog.Scale
getset

A factor by which all sizes are multiplied, is ignored in fullscreen mode

Point OmegaGUI.Model.Dialog.Shift
getset

A set of coordinates by which all control positions are shifted

Size OmegaGUI.Model.Dialog.Size
getset

The initial size of the dialog, used for auto-scaling fullscreen dialogs - no auto-update

Color OmegaGUI.Model.Dialog.TextColor
getset

The color of text on the dialog - no auto-update

string OmegaGUI.Model.Dialog.TextureFile
getset

The file containing the texture for controls on this dialog - no auto-update

Control OmegaGUI.Model.Dialog.this[string name]
get

Gets the first Control in this Dialog with the specified name

Exceptions
ArgumentNullExceptionname is null.
KeyNotFoundExceptionAn element with the specified key does not exist in the dictionary.
bool OmegaGUI.Model.Dialog.Visible
getset

Is this dialog currently visible?

Event Documentation

ScriptExecution OmegaGUI.Model.Dialog.ScriptFired

Occurs whenever one of the controls fires a script


The documentation for this class was generated from the following file: