Cyrus Mod Loader
Loading...
Searching...
No Matches
Window Class Reference

Represents a Wizard101 Window, think anything you see on screen that is not a 3D model. More...

#include <Window.h>

Inheritance diagram for Window:
PropertyClass BalloonBaseWindow BattlegroundMiniMapWindow BrightnessControlWindow CSRSpellList CantripLevelControl ColorPickerSWF CombatPlanningPhaseWindow CompassMarkerWindow ControlBar ControlButton ControlComboBox ControlDraw ControlEdit ControlLine ControlSWF ControlSprite ControlStretcher ControlTab ControlText ControlTileMap ControlTree ControlWidget ControlZone CreationNameSelectWindowSWF CrownsConfirmWindow DeckConfigurationWindow DeckListControl EmojiWindow FishingLevelControl FriendSortByWindow FriendSymbolWindow FriendsListWindow GardenLevelControl GraphicalSpellWindow HUDWindow InventoryPageWindow MiniMapWindow MonsterMagicLevelControl NPCTrainingWindow NewFriendsListWindow ParticleSystem2D PermanentShop PermanentShopWindowPassThru PetGameActionList PetGeneticsControl PetInfoControl PetLevelUpWindow PetStatBlockControl PetStatsControl PetTalentControlBase PetTalentCountControl PipControl PlanningTimerControl PortraitWindow RootWindow SchoolPipGauge SchoolPipPanel SchoolPipSelector SpectatorWindow SpellBookPrefsWindow SpellListControl SpellSelectionWindow SubscriberBenefitControl TeamHelpFailWindow TeamHelpWindow TeamUpVolunteerWindow TeamUpWindow TestControlTableWindow ThumbnailControl ToolTipWindow TriviaWindow WindowLayout WizardControlTable WorldWindow ZoneTokenBaseControl ZoneTokenWindow

Public Member Functions

CYRUS int32_t getWindowID () const
 Retrieve the unique identifier for the Window.
 
CYRUS std::list< ClickResponder_t > getClickResponders ()
 
CYRUS std::string getName ()
 Retrieve the name of the Window.
 
CYRUS std::vector< std::shared_ptr< Window > > getChildren ()
 Retrieve the child Windows of this Window.
 
CYRUS WindowgetParent ()
 Get the Windows parent Window.
 
CYRUS std::string getFlags ()
 
CYRUS std::string getStyles ()
 
CYRUS void addFlag (uint32_t flag)
 Unconditionally sets the specified Window flag to 1.
 
CYRUS void addStyle (uint32_t style)
 Unconditionally sets the specified Window style to 1.
 
CYRUS void toggleFlag (uint32_t flag)
 Toggles the current value of the specified Window flag.
 
CYRUS void toggleStyle (uint32_t style)
 Toggles the current value of the specified Window style.
 
CYRUS void removeFlag (uint32_t flag)
 Unconditionally sets the specified Window flag to 0.
 
CYRUS void removeStyle (uint32_t style)
 Unconditionally sets the specified Window style to 0.
 
CYRUS RectgetTransform ()
 Get the transformation coordinates of the window.
 
CYRUS void setTransform (Rect in)
 Sets the transformation coordinates of the window.
 
CYRUS VectorI2D getParentOffset () const
 Get the offset of the window relative to its parent.
 
CYRUS float getTimeOnScreen () const
 Get the total time the window has been displayed on the screen.
 
CYRUS void setTimeOnScreen (float screenTime)
 Set the total time the window has been displayed on the screen.
 
CYRUS float getDisabledAlpha () const
 Get the alpha value when the window is disabled.
 
CYRUS void setFDisabledAlpha (float fDisabledAlpha)
 Set the alpha value for when the window is disabled.
 
CYRUS float getTargetAlpha () const
 Get the target alpha value of the window.
 
CYRUS void setFTargetAlpha (float fTargetAlpha)
 Set the target alpha value of the window.
 
CYRUS Vector2D getScale () const
 Get the scale of the window.
 
CYRUS void setScale (float x, float y)
 Sets the scale of the window.
 
CYRUS VectorI2D getOffset () const
 Get the offset of the window.
 
CYRUS void performScale (float factor)
 Scales the current Window, and all descendants, by the scale factor. If the scale factor is 2, the Window and it's descendants will be twice as large. If the scale factor is 0.5, the Window and it's descendants will be twice as small.
 
template<class T >
CYRUS T * findChild (const std::string &name)
 Find a child Window by name and cast it to the specified type.
 
template<class T >
CYRUS T * findDescendant (const std::string &name)
 Find a descendant Window by name and cast it to the specified type.
 
virtual void func1 ()
 
virtual void func2 ()
 
virtual void func3 ()
 
virtual void func4 ()
 
virtual void func5 ()
 
virtual void func6 ()
 
virtual void func7 ()
 
virtual void func8 ()
 
virtual void func9 ()
 
virtual void func10 ()
 
virtual void func11 ()
 
virtual void func12 ()
 
virtual void func13 ()
 
virtual void func14 ()
 
virtual void func15 ()
 
virtual void func16 ()
 
virtual void func17 ()
 
virtual void func18 ()
 
virtual void func19 ()
 
virtual void func20 ()
 
virtual void func21 ()
 
virtual void func22 ()
 
virtual void func23 ()
 
virtual void func24 ()
 
virtual void func25 ()
 
virtual void func26 ()
 
virtual void func27 ()
 
virtual void func28 ()
 
virtual void func29 ()
 
virtual void func30 ()
 
virtual void func31 ()
 
virtual void func32 ()
 
virtual void func33 ()
 
virtual void func34 ()
 
virtual void func35 ()
 
virtual bool updateDockPosition ()
 
- Public Member Functions inherited from PropertyClass
virtual char * getClassName ()=0
 Gets the class name of the derived class in the format class T[*].
 
virtual void * getPropertyList ()=0
 Constructs and caches the PropertyList for the derived class, adding all reflected members and member functions.
 
virtual bool copy (uint32_t a1)=0
 Copies the property class data.
 
virtual void * serialize (void *a2, uint32_t a3)=0
 Serializes the derived class's PropertyList as XML.
 
virtual bool onCreated ()=0
 Called when the PropertyClass is created.
 
template<typename T >
CYRUS T * as ()
 Casts this to a pointer of type T.
 
virtual void onPostLoad ()=0
 Called when the PropertyClass is loaded, i.e., initialize is called and onCreated has finished.
 
virtual void onFinalizeLoad ()=0
 
virtual bool shouldNotSerialize ()=0
 Determines if the PropertyClass should not be serialized.
 

Friends

struct WindowLayout
 

Detailed Description

Represents a Wizard101 Window, think anything you see on screen that is not a 3D model.

This class inherits from PropertyClass and provides functionality for managing windows. It contains various member variables and member functions for manipulating the window properties.

Member Function Documentation

◆ addFlag()

void Window::addFlag ( uint32_t flag)

Unconditionally sets the specified Window flag to 1.

This function sets the specified flag in the internal flags variable to 1. It performs a bitwise OR operation to ensure the flag is set without affecting other flags.

Parameters
flagThe flag to be set.

◆ addStyle()

void Window::addStyle ( uint32_t style)

Unconditionally sets the specified Window style to 1.

This function sets the specified style in the internal style variable to 1. It performs a bitwise OR operation to ensure the style is set without affecting other styles.

Parameters
styleThe style to be set.

◆ findChild()

template<class T >
CYRUS T * Window::findChild ( const std::string & name)
inline

Find a child Window by name and cast it to the specified type.

This function searches through the immediate children of the current Window to find a child with the specified name. If a matching child is found, it is cast to the specified type T and returned. If no matching child is found, the function returns nullptr.

Template Parameters
TThe type to which the found child should be cast.
Parameters
nameThe name of the child Window to find.
Returns
A pointer to the child Window cast to type T, or nullptr if no matching child is found.

◆ findDescendant()

template<class T >
CYRUS T * Window::findDescendant ( const std::string & name)
inline

Find a descendant Window by name and cast it to the specified type.

This function searches through the immediate children and all their descendants of the current Window to find a descendant with the specified name. If a matching descendant is found, it is cast to the specified type T and returned. If no matching descendant is found, the function returns nullptr.

Template Parameters
TThe type to which the found descendant should be cast.
Parameters
nameThe name of the descendant Window to find.
Returns
A pointer to the descendant Window cast to type T, or nullptr if no matching descendant is found.

◆ func1()

virtual void Window::func1 ( )
virtual

◆ func10()

virtual void Window::func10 ( )
virtual

◆ func11()

virtual void Window::func11 ( )
virtual

◆ func12()

virtual void Window::func12 ( )
virtual

◆ func13()

virtual void Window::func13 ( )
virtual

◆ func14()

virtual void Window::func14 ( )
virtual

◆ func15()

virtual void Window::func15 ( )
virtual

◆ func16()

virtual void Window::func16 ( )
virtual

◆ func17()

virtual void Window::func17 ( )
virtual

◆ func18()

virtual void Window::func18 ( )
virtual

◆ func19()

virtual void Window::func19 ( )
virtual

◆ func2()

virtual void Window::func2 ( )
virtual

◆ func20()

virtual void Window::func20 ( )
virtual

◆ func21()

virtual void Window::func21 ( )
virtual

◆ func22()

virtual void Window::func22 ( )
virtual

◆ func23()

virtual void Window::func23 ( )
virtual

◆ func24()

virtual void Window::func24 ( )
virtual

◆ func25()

virtual void Window::func25 ( )
virtual

◆ func26()

virtual void Window::func26 ( )
virtual

◆ func27()

virtual void Window::func27 ( )
virtual

◆ func28()

virtual void Window::func28 ( )
virtual

◆ func29()

virtual void Window::func29 ( )
virtual

◆ func3()

virtual void Window::func3 ( )
virtual

◆ func30()

virtual void Window::func30 ( )
virtual

◆ func31()

virtual void Window::func31 ( )
virtual

◆ func32()

virtual void Window::func32 ( )
virtual

◆ func33()

virtual void Window::func33 ( )
virtual

◆ func34()

virtual void Window::func34 ( )
virtual

◆ func35()

virtual void Window::func35 ( )
virtual

◆ func4()

virtual void Window::func4 ( )
virtual

◆ func5()

virtual void Window::func5 ( )
virtual

◆ func6()

virtual void Window::func6 ( )
virtual

◆ func7()

virtual void Window::func7 ( )
virtual

◆ func8()

virtual void Window::func8 ( )
virtual

◆ func9()

virtual void Window::func9 ( )
virtual

◆ getChildren()

std::vector< std::shared_ptr< Window > > Window::getChildren ( )

Retrieve the child Windows of this Window.

This function returns a vector of shared pointers to the children of this Window. Each child is also a Window object. This allows you to access and manipulate the hierarchical structure of Windows.

Returns
A vector containing shared pointers to the child Window objects.

◆ getClickResponders()

std::list< ClickResponder_t > Window::getClickResponders ( )

◆ getDisabledAlpha()

float Window::getDisabledAlpha ( ) const

Get the alpha value when the window is disabled.

Returns
The alpha value.

◆ getFlags()

std::string Window::getFlags ( )

◆ getName()

std::string Window::getName ( )

Retrieve the name of the Window.

This function returns the name assigned to the Window. The name can be used for identification or display purposes.

Returns
A string containing the name of the Window.

◆ getOffset()

VectorI2D Window::getOffset ( ) const

Get the offset of the window.

Returns
The offset as a structure containing x and y values.

◆ getParent()

Window * Window::getParent ( )

Get the Windows parent Window.

This function returns the parent window if it exists. If there is no parent window, it returns nullptr.

Returns
The Windows parent Window, or nullptr if there is no parent window.

◆ getParentOffset()

VectorI2D Window::getParentOffset ( ) const

Get the offset of the window relative to its parent.

Returns
The offset as a structure containing x and y values.

◆ getScale()

Vector2D Window::getScale ( ) const

Get the scale of the window.

Returns
The scale as a structure containing x and y values.

◆ getStyles()

std::string Window::getStyles ( )

◆ getTargetAlpha()

float Window::getTargetAlpha ( ) const

Get the target alpha value of the window.

Returns
The target alpha value.

◆ getTimeOnScreen()

float Window::getTimeOnScreen ( ) const

Get the total time the window has been displayed on the screen.

Returns
The time in seconds.

◆ getTransform()

Rect * Window::getTransform ( )

Get the transformation coordinates of the window.

Returns
The transformation coordinates as a structure containing left, top, right, and bottom values.

◆ getWindowID()

int32_t Window::getWindowID ( ) const

Retrieve the unique identifier for the Window.

Each Window object has a unique identifier that can be used to distinguish it from other Window objects. This function returns that unique identifier.

Returns
An integer representing the unique Window ID.

◆ performScale()

void Window::performScale ( float factor)

Scales the current Window, and all descendants, by the scale factor. If the scale factor is 2, the Window and it's descendants will be twice as large. If the scale factor is 0.5, the Window and it's descendants will be twice as small.

◆ removeFlag()

void Window::removeFlag ( uint32_t flag)

Unconditionally sets the specified Window flag to 0.

This function clears the specified flag in the internal flags variable by setting it to 0. It performs a bitwise AND operation with the complement of the flag to ensure the flag is cleared without affecting other flags.

Parameters
flagThe flag to be cleared.

◆ removeStyle()

void Window::removeStyle ( uint32_t style)

Unconditionally sets the specified Window style to 0.

This function clears the specified style in the internal style variable by setting it to 0. It performs a bitwise AND operation with the complement of the style to ensure the style is cleared without affecting other styles.

Parameters
styleThe style to be cleared.

◆ setFDisabledAlpha()

void Window::setFDisabledAlpha ( float fDisabledAlpha)

Set the alpha value for when the window is disabled.

Parameters
fDisabledAlphaThe alpha value.

◆ setFTargetAlpha()

void Window::setFTargetAlpha ( float fTargetAlpha)

Set the target alpha value of the window.

Parameters
fTargetAlphaThe target alpha value.

◆ setScale()

void Window::setScale ( float x,
float y )

Sets the scale of the window.

Parameters
xThe horizontal scaling factor
yThe vertical scaling factor

◆ setTimeOnScreen()

void Window::setTimeOnScreen ( float screenTime)

Set the total time the window has been displayed on the screen.

Parameters
screenTimeThe time in seconds.

◆ setTransform()

void Window::setTransform ( Rect in)

Sets the transformation coordinates of the window.

◆ toggleFlag()

void Window::toggleFlag ( uint32_t flag)

Toggles the current value of the specified Window flag.

This function flips the current value of the specified flag in the internal flags variable. If the flag is currently set to 1, it will be changed to 0, and if it is currently set to 0, it will be changed to 1.

Parameters
flagThe flag to be toggled.

◆ toggleStyle()

void Window::toggleStyle ( uint32_t style)

Toggles the current value of the specified Window style.

This function flips the current value of the specified style in the internal style variable. If the style is currently set to 1, it will be changed to 0, and if it is currently set to 0, it will be changed to 1.

Parameters
styleThe style to be toggled.

◆ updateDockPosition()

virtual bool Window::updateDockPosition ( )
virtual

Friends And Related Symbol Documentation

◆ WindowLayout

friend struct WindowLayout
friend