I love the smell of UnrealEd crashing in the morning. – tarquin

Difference between revisions of "Legacy:Solid Snake/CeFloatingWindow"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
 
Line 1: Line 1:
{{classbox| [[Legacy:... ENGINE ...|... ENGINE ...]] :: [[Legacy:Object|Object]] >> [[Legacy:GUI|GUI]] >> [[Legacy:GUIComponent|GUIComponent]] >> [[Legacy:GUIMultiComponent|GUIMultiComponent]] >> [[Legacy:GUIPage|GUIPage]] >> [[Legacy:UT2K4GUIPage|UT2K4GUIPage]] >> [[Legacy:PopupPageBase|PopupPageBase]] >> [[Legacy:FloatingWindow|FloatingWindow]] >> [[Legacy:CeFloatingWindow|ceFloatingWindow]]}}
+
{{classbox| Chaos Engine:: [http://wiki.beyondunreal.com/wiki/Solid_Snake/Chaos_Engine ceInterface] >> ceFloatingWindow}}
  
==Properties==
+
==Variables==
; float OldMouseX :  
+
; i_WindowBackgroundImage ([[Legacy:GUIImage|GUIImage]]) [[Legacy:Automated_Component|automated]] : This is legacy code and will be removed at some stage.
; float OldMouseY :  
+
; i_WindowBackgroundGradient ([[Legacy:GUIImage|GUIImage]]) [[Legacy:Automated_Component|automated]] : This is legacy code and will be removed at some stage.
 +
; OldMouseX ([[Legacy:Variable_Type|float]]): Stores the old mouse X position which is used for the calculation the movement of the window.
 +
; OldMouseY ([[Legacy:Variable_Type|float]]): Stores the old mouse Y position which is used for the calculation the movement of the window.
 +
; WindowBackgroundImage ([[Legacy:Material|Material]]) : This defines what image to use as the window background. This is now legacy code.
 +
; WindowBackgroundColor ([[Legacy:Built-In_Structs|color]]) : This defines what image color to use for the window background. This is now legacy code.
 +
; bUseTitleBar ([[Legacy:Variable_Type|bool]]) : This toggles the use of a title/head bar on the window.
 +
; LeftBorder ([[Legacy:Variable_Type|int]]) : This defines the left border at which the window cannot move/enlarge past.
 +
; RightBorder ([[Legacy:Variable_Type|int]]) : This defines the right border at which the window cannot move/enlarge past.
 +
; UpperBorder ([[Legacy:Variable_Type|int]]) : This defines the top border at which the window cannot move/enlarge past.
 +
; BottomBorder ([[Legacy:Variable_Type|int]]) : This defines the bottom border at which the window cannot move/enlarge past.
  
===ceFloatingWindow===
+
{{innerbox| A lot of these variables were first defined on the creation of this class. I will probably optimize a lot of the code a little later on, or compress them into structs to allow for easier code handling.
; bool bAllowMultipleInstances :
+
; bool bDontLoseFocus :
+
; bool bUseTitleBar :
+
; FloatBox InnerBorder :
+
; FloatBox InnerBoundBox :
+
  
==Delegates==
+
}}
; GUIButton OnContextMenuClick(ceGUIContextMenu Sender, string Item ):
+
;  OnContextMenuQuery(ceGUIContextMenu Sender, out GUIComponent FocusedControl ):
+
; bool OnRefresh( ):
+
  
 
==Functions==
 
==Functions==
; GUIButton AddSystemButton(string StyleName ):  
+
; InitComponent([[Legacy:GUIController|GUIController]] MyController, [[Legacy:GUIComponent|GUIComponent]] MyOwner) : This function is called on the creation of the window. What occurs here is simple variable setting, the creation of the title bar (if bUseTitleBar is true) and the setting of the background image (Now redundant).
;  AddSystemMenu( ):  
+
;; MyController ([[Legacy:GUIController|GUIController]]) : This is the GUIController.
; bool FloatingHover(GUIComponent Sender ):  
+
;; MyOwner ([[Legacy:GUIComponent|GUIComponent]]): Often when GUIComponents are created, they are owned by another GUIComponent.
;  FloatingMousePressed(GUIComponent Sender, bool bRepeat ):
+
;  FloatingMouseRelease(GUIComponent Sender ):
+
; bool FloatingPreDraw(Canvas C ):
+
; FloatingRendered(Canvas C ):
+
; ForceWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight ):  
+
; GUIComponent GetGUIComponentOnContextQuery( ):  
+
; class<ceModuleInfo> GetModuleInfo( ):
+
; GetWindowBounds(out float LeftBound, out float TopBound, out float RightBound, out float BottomBound ):  
+
;  GetWindowDimensions(out float AL, out float AT, out float AW, out float AH ):
+
;  HoveringCorners(out int Left, out int Top, out int Right, out int Bottom ):
+
;  InitComponent(GUIController MyController, GUIComponent MyOwner ):
+
; bool InternalOnClick(GUIComponent Sender ):  
+
; bool InternalOnContextMenuQuery(ceGUIContextMenu Sender, out GUIComponent FocusedControl ):
+
; bool InternalOnPreDraw(Canvas Canvas ):
+
; bool IsInBounds( ):
+
;  SetFocus(GUIComponent Who ):
+
;  SetWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight ):
+
  
==Events==
+
; GUIButton AddSystemButton([[Legacy:Variable_Type|string]] StyleName) ['''[[Legacy:GUIButton|GUIButton]]''']: This creates the buttons that stay within the title bar, returning the created button.
 +
;; StyleName ([[Legacy:Variable_Type|string]]) : This is the style name of the style that should be created for the new button.
 +
 
 +
; AddSystemMenu() : This is a function which you can subclass to create more buttons.
 +
 
 +
; GetModuleInfo() ['''class<ceModuleInfo>''']: This function returns the ceModuleInfo class that resides within ceGUIController.ModuleInfo. If that variable is none, then it returns class'ceModuleInfo' as the default value.
 +
 
 +
; InternalOnClick([[Legacy:GUIComponent|GUIComponent]] Sender) ['''[[Legacy:Variable_Type|bool]]''']: This function is called when most GUIComponents are clicked.
 +
;; Sender ([[Legacy:GUIComponent|GUIComponent]]) : This points to the GUIComponent that called this function. Returns a boolean value.
 +
 
 +
; InternalOnPreDraw([[Legacy:Canvas|Canvas]]|Canvas) ['''[[Legacy:Variable_Type|bool]]''']: With InternalOnPreDraw, you can change GUIComponent values safely before they are rendered, thus this is the best place to change their images or their positions. Return true if you wish to override the native OnPreDraw function.
 +
;; Canvas ([[Legacy:Canvas|Canvas]]) : This points to the Canvas which called this function.
 +
 
 +
; SetFocus([[Legacy:GUIComponent|GUIComponent]] Who) : This is called when focus is set back to the window. The main reason for this is to reset the desktop menu bar, although you can use it for other purposes as well.
 +
;; Who ([[Legacy:GUIComponent|GUIComponent]]) : I haven't figured out this one yet.
 +
 
 +
; SetWindowPosition([[Legacy:Variable_Type|float]] NewActualLeft, [[Legacy:Variable_Type|float]] NewActualTop, [[Legacy:Variable_Type|float]] NewActualWidth, [[Legacy:Variable_Type|float]] NewActualHeight) : This function sets the new window position and width.
 +
;; NewActualLeft ([[Legacy:Variable_Type|float]]) : This is the new left position of the window in pixels.
 +
;; NewActualTop ([[Legacy:Variable_Type|float]]) : This is the new top position of the window in pixels.
 +
;; NewActualWidth ([[Legacy:Variable_Type|float]]) : This is the new width of the window in pixels.
 +
;; NewActualHeight ([[Legacy:Variable_Type|float]]) : This is the new height of the window in pixels.
 +
 
 +
; FloatingMousePressed([[Legacy:GUIComponent|GUIComponent]] Sender, [[Legacy:Variable_Type|bool]] bRepeat) : This is another function which specifically handles the mouse interactions with the window, in specifically the dragging of the window mouse to move/resize the window.
 +
;; Sender ([[Legacy:GUIComponent|GUIComponent]]) : This is the GUIComponent that called this function.
 +
;; bRepeat ([[Legacy:Variable_Type|bool]]) : Not 100% sure at this moment. I guess this is true if the mouse clicks are repeated.
 +
 
 +
; FloatingMouseRelease([[Legacy:GUIComponent|GUIComponent]] Sender) : This is in response to when the mouse is released when dragging the window to move/resize the window.
 +
;; Sender ([[Legacy:GUIComponent|GUIComponent]]) : This is the GUIComponent that called this function.
 +
 
 +
; ForceWindowPosition([[Legacy:Variable_Type|float]] NewActualLeft, [[Legacy:Variable_Type|float]] NewActualTop, [[Legacy:Variable_Type|float]] NewActualWidth, [[Legacy:Variable_Type|float]] NewActualHeight) : This function forces the window position to the ones parsed and saves it.
 +
;; NewActualLeft ([[Legacy:Variable_Type|float]]) : This is the new left position of the window in pixels.
 +
;; NewActualTop ([[Legacy:Variable_Type|float]]) : This is the new top position of the window in pixels.
 +
;; NewActualWidth ([[Legacy:Variable_Type|float]]) : This is the new width of the window in pixels.
 +
;; NewActualHeight ([[Legacy:Variable_Type|float]]) : This is the new height of the window in pixels.
 +
 
 +
; FloatingPreDraw([[Legacy:Canvas|Canvas]] C) ['''[[Legacy:Variable_Type|bool]]'''] : This function controls the calculation of the new window position and size.
 +
 
 +
; function FloatingRendered([[Legacy:Canvas|Canvas]] C) : This function doesn't do anything any more.
 +
 
 +
===Comments===

Revision as of 23:12, 25 May 2005

Chaos Engine:: ceInterface >> ceFloatingWindow

Variables

i_WindowBackgroundImage (GUIImage) automated 
This is legacy code and will be removed at some stage.
i_WindowBackgroundGradient (GUIImage) automated 
This is legacy code and will be removed at some stage.
OldMouseX (float)
Stores the old mouse X position which is used for the calculation the movement of the window.
OldMouseY (float)
Stores the old mouse Y position which is used for the calculation the movement of the window.
WindowBackgroundImage (Material
This defines what image to use as the window background. This is now legacy code.
WindowBackgroundColor (color
This defines what image color to use for the window background. This is now legacy code.
bUseTitleBar (bool
This toggles the use of a title/head bar on the window.
LeftBorder (int
This defines the left border at which the window cannot move/enlarge past.
RightBorder (int
This defines the right border at which the window cannot move/enlarge past.
UpperBorder (int
This defines the top border at which the window cannot move/enlarge past.
BottomBorder (int
This defines the bottom border at which the window cannot move/enlarge past.

A lot of these variables were first defined on the creation of this class. I will probably optimize a lot of the code a little later on, or compress them into structs to allow for easier code handling.

Functions

InitComponent(GUIController MyController, GUIComponent MyOwner) 
This function is called on the creation of the window. What occurs here is simple variable setting, the creation of the title bar (if bUseTitleBar is true) and the setting of the background image (Now redundant).
MyController (GUIController
This is the GUIController.
MyOwner (GUIComponent)
Often when GUIComponents are created, they are owned by another GUIComponent.
GUIButton AddSystemButton(string StyleName) [GUIButton]
This creates the buttons that stay within the title bar, returning the created button.
StyleName (string
This is the style name of the style that should be created for the new button.
AddSystemMenu() 
This is a function which you can subclass to create more buttons.
GetModuleInfo() [class<ceModuleInfo>]
This function returns the ceModuleInfo class that resides within ceGUIController.ModuleInfo. If that variable is none, then it returns class'ceModuleInfo' as the default value.
InternalOnClick(GUIComponent Sender) [bool]
This function is called when most GUIComponents are clicked.
Sender (GUIComponent
This points to the GUIComponent that called this function. Returns a boolean value.
InternalOnPreDraw(Canvas|Canvas) [bool]
With InternalOnPreDraw, you can change GUIComponent values safely before they are rendered, thus this is the best place to change their images or their positions. Return true if you wish to override the native OnPreDraw function.
Canvas (Canvas
This points to the Canvas which called this function.
SetFocus(GUIComponent Who) 
This is called when focus is set back to the window. The main reason for this is to reset the desktop menu bar, although you can use it for other purposes as well.
Who (GUIComponent
I haven't figured out this one yet.
SetWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight) 
This function sets the new window position and width.
NewActualLeft (float
This is the new left position of the window in pixels.
NewActualTop (float
This is the new top position of the window in pixels.
NewActualWidth (float
This is the new width of the window in pixels.
NewActualHeight (float
This is the new height of the window in pixels.
FloatingMousePressed(GUIComponent Sender, bool bRepeat) 
This is another function which specifically handles the mouse interactions with the window, in specifically the dragging of the window mouse to move/resize the window.
Sender (GUIComponent
This is the GUIComponent that called this function.
bRepeat (bool
Not 100% sure at this moment. I guess this is true if the mouse clicks are repeated.
FloatingMouseRelease(GUIComponent Sender) 
This is in response to when the mouse is released when dragging the window to move/resize the window.
Sender (GUIComponent
This is the GUIComponent that called this function.
ForceWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight) 
This function forces the window position to the ones parsed and saves it.
NewActualLeft (float
This is the new left position of the window in pixels.
NewActualTop (float
This is the new top position of the window in pixels.
NewActualWidth (float
This is the new width of the window in pixels.
NewActualHeight (float
This is the new height of the window in pixels.
FloatingPreDraw(Canvas C) [bool
This function controls the calculation of the new window position and size.
function FloatingRendered(Canvas C) 
This function doesn't do anything any more.

Comments