Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Shell Class Reference

#include <Shell.h>

Inherits SubsystemInterface.

Public Member Functions

 Shell (void)
 
 ~Shell (void)
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
void showShellMap (Bool useShellMap)
 access function to turn on and off the shell map
 
void hide (Bool hide)
 show/hide all shell layouts
 
void push (AsciiString filename, Bool shutdownImmediate=FALSE)
 load new screen on top, optionally doing an immediate shutdown
 
void pop (void)
 pop top layout
 
void popImmediate (void)
 pop now, don't wait for shutdown
 
void showShell (Bool runInit=TRUE)
 init the top of stack
 
void hideShell (void)
 shutdown the top of stack
 
WindowLayouttop (void)
 return top layout
 
void shutdownComplete (WindowLayout *layout, Bool impendingPush=FALSE)
 layout has completed shutdown
 
WindowLayoutfindScreenByFilename (AsciiString filename)
 find screen
 
Bool isShellActive (void)
 Returns true if the shell is active.
 
Int getScreenCount (void)
 Return the current number of screens.
 
void registerWithAnimateManager (GameWindow *win, AnimTypes animType, Bool needsToFinish, UnsignedInt delayMS=0)
 
Bool isAnimFinished (void)
 
void reverseAnimatewindow (void)
 
Bool isAnimReversed (void)
 
void loadScheme (AsciiString name)
 
ShellMenuSchemeManagergetShellMenuSchemeManager (void)
 
WindowLayoutgetSaveLoadMenuLayout (void)
 create if necessary and return layout for save load menu
 
WindowLayoutgetPopupReplayLayout (void)
 create if necessary and return layout for replay save menu
 
WindowLayoutgetOptionsLayout (Bool create)
 return layout for options menu, create if necessary and we are allowed to.
 
void destroyOptionsLayout (void)
 destroy the shell's options layout.
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Types

enum  { MAX_SHELL_STACK = 16 }
 

Protected Member Functions

void linkScreen (WindowLayout *screen)
 link screen to list
 
void unlinkScreen (WindowLayout *screen)
 remove screen from list
 
void doPush (AsciiString layoutFile)
 workhorse for push action
 
void doPop (Bool impendingPush)
 workhorse for pop action
 

Protected Attributes

WindowLayoutm_screenStack [MAX_SHELL_STACK]
 the screen layout stack
 
Int m_screenCount
 
WindowLayoutm_background
 The Background layout if the 3d shell isn't running.
 
Bool m_clearBackground
 Flag if we're going to clear the background or not.
 
Bool m_pendingPush
 TRUE when a push is pending.
 
Bool m_pendingPop
 TRUE when a pop is pending.
 
AsciiString m_pendingPushName
 layout name to be pushed
 
Bool m_isShellActive
 TRUE when the shell is active.
 
Bool m_shellMapOn
 TRUE when the shell map is on.
 
AnimateWindowManagerm_animateWindowManager
 The animate Window Manager.
 
ShellMenuSchemeManagerm_schemeManager
 The Shell Scheme Manager.
 
WindowLayoutm_saveLoadMenuLayout
 save/load menu layout
 
WindowLayoutm_popupReplayLayout
 replay save menu layout
 
WindowLayoutm_optionsLayout
 options menu layout
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

This is the interface to the shell system to load, display, and manage screen menu shell system layouts

Definition at line 114 of file Shell.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_SHELL_STACK 

Definition at line 168 of file Shell.h.

Constructor & Destructor Documentation

◆ Shell()

Shell::Shell ( void )

Definition at line 59 of file Shell.cpp.

◆ ~Shell()

Shell::~Shell ( void )

Definition at line 88 of file Shell.cpp.

Member Function Documentation

◆ destroyOptionsLayout()

void Shell::destroyOptionsLayout ( void )

destroy the shell's options layout.

Definition at line 834 of file Shell.cpp.

◆ doPop()

void Shell::doPop ( Bool impendingPush)
protected

workhorse for pop action

Actually do the work for a pop

Definition at line 633 of file Shell.cpp.

◆ doPush()

void Shell::doPush ( AsciiString layoutFile)
protected

workhorse for push action

Actually do the work for a push

Definition at line 607 of file Shell.cpp.

◆ findScreenByFilename()

WindowLayout * Shell::findScreenByFilename ( AsciiString filename)

find screen

Find a screen via the .wnd script filename loaded

Definition at line 223 of file Shell.cpp.

◆ getOptionsLayout()

WindowLayout * Shell::getOptionsLayout ( Bool create)

return layout for options menu, create if necessary and we are allowed to.

Definition at line 817 of file Shell.cpp.

◆ getPopupReplayLayout()

WindowLayout * Shell::getPopupReplayLayout ( void )

create if necessary and return layout for replay save menu

Definition at line 800 of file Shell.cpp.

◆ getSaveLoadMenuLayout()

WindowLayout * Shell::getSaveLoadMenuLayout ( void )

create if necessary and return layout for save load menu

Definition at line 783 of file Shell.cpp.

◆ getScreenCount()

Int Shell::getScreenCount ( void )
inline

Return the current number of screens.

Definition at line 145 of file Shell.h.

◆ getShellMenuSchemeManager()

ShellMenuSchemeManager * Shell::getShellMenuSchemeManager ( void )
inline

Definition at line 153 of file Shell.h.

◆ hide()

void Shell::hide ( Bool hide)

show/hide all shell layouts

Hide or unhide all window layouts loaded

Definition at line 248 of file Shell.cpp.

◆ hideShell()

void Shell::hideShell ( void )

shutdown the top of stack

Run the shutdown() function for the top of the stack just like we're going to pop it off but DO NOT pop it off the stack. We want this behavior when leaving the pre-game menus and entering the game and want the shell to still exist and contain the stack information but don't want it to go away

Definition at line 520 of file Shell.cpp.

◆ init()

void Shell::init ( void )
virtual

Initialize the shell system

Implements SubsystemInterface.

Definition at line 144 of file Shell.cpp.

◆ isAnimFinished()

Bool Shell::isAnimFinished ( void )

Definition at line 731 of file Shell.cpp.

◆ isAnimReversed()

Bool Shell::isAnimReversed ( void )

Definition at line 759 of file Shell.cpp.

◆ isShellActive()

Bool Shell::isShellActive ( void )
inline

Returns true if the shell is active.

Definition at line 143 of file Shell.h.

◆ linkScreen()

void Shell::linkScreen ( WindowLayout * screen)
protected

link screen to list

Add screen to our list

Definition at line 564 of file Shell.cpp.

◆ loadScheme()

void Shell::loadScheme ( AsciiString name)

Definition at line 773 of file Shell.cpp.

◆ pop()

void Shell::pop ( void )

pop top layout

Pop top layout of the stack. Note that we don't actually do the pop right here, we instead run the layout shutdown. That shutdown() in turn notifies the shell when the shutdown is complete and at that point we do the actual pop

Definition at line 330 of file Shell.cpp.

◆ popImmediate()

void Shell::popImmediate ( void )

pop now, don't wait for shutdown

When you need to immediately pop a screen off the stack use this method. It gives the screen the opportunity to shutdown and tells the shutdown method that an immediate pop is going to take place. When control returns from the shutdown() for the screen, it will be immediately popped off the stack

Definition at line 372 of file Shell.cpp.

◆ push()

void Shell::push ( AsciiString filename,
Bool shutdownImmediate = FALSE )

load new screen on top, optionally doing an immediate shutdown

Push layout onto shell

Definition at line 264 of file Shell.cpp.

◆ registerWithAnimateManager()

void Shell::registerWithAnimateManager ( GameWindow * win,
AnimTypes animType,
Bool needsToFinish,
UnsignedInt delayMS = 0 )

Definition at line 720 of file Shell.cpp.

◆ reset()

void Shell::reset ( void )
virtual

Reset the shell system to a clean state just as though init had just been called and ready to re-use

Implements SubsystemInterface.

Definition at line 160 of file Shell.cpp.

◆ reverseAnimatewindow()

void Shell::reverseAnimatewindow ( void )

Definition at line 748 of file Shell.cpp.

◆ showShell()

void Shell::showShell ( Bool runInit = TRUE)

init the top of stack

Run the initialize function for the top of the stack just as though it was pushed on the stack. We want this behavior when we want to act like the top was just pushed on the stack, but it's already there (ie going from in game back to the pre-game shell menus

Definition at line 409 of file Shell.cpp.

◆ showShellMap()

void Shell::showShellMap ( Bool useShellMap)

access function to turn on and off the shell map

Definition at line 472 of file Shell.cpp.

◆ shutdownComplete()

void Shell::shutdownComplete ( WindowLayout * screen,
Bool impendingPush = FALSE )

layout has completed shutdown

This is called when a layout has finished its shutdown process. Layouts are shutdown when a new screen is being pushed on the stack, or when we are popping the current screen off the top of the stack. It is here that we can look for any pending push or pop operations and actually do them

NOTE: It is possible for the screen parameter to be NULL when we are short circuiting the shutdown logic because there is no layout to actually shutdown (ie, the stack is empty and we push)

Definition at line 672 of file Shell.cpp.

◆ top()

WindowLayout * Shell::top ( void )

return top layout

Return the top layout on the stack

Definition at line 548 of file Shell.cpp.

◆ unlinkScreen()

void Shell::unlinkScreen ( WindowLayout * screen)
protected

remove screen from list

Remove screen from our list

Definition at line 588 of file Shell.cpp.

◆ update()

void Shell::update ( void )
virtual

Update shell system cycle. All windows are updated that are on the stack, starting with the top layout and progressing to the bottom one

Implements SubsystemInterface.

Definition at line 178 of file Shell.cpp.

Member Data Documentation

◆ m_animateWindowManager

AnimateWindowManager* Shell::m_animateWindowManager
protected

The animate Window Manager.

Definition at line 180 of file Shell.h.

◆ m_background

WindowLayout* Shell::m_background
protected

The Background layout if the 3d shell isn't running.

Definition at line 172 of file Shell.h.

◆ m_clearBackground

Bool Shell::m_clearBackground
protected

Flag if we're going to clear the background or not.

Definition at line 173 of file Shell.h.

◆ m_isShellActive

Bool Shell::m_isShellActive
protected

TRUE when the shell is active.

Definition at line 178 of file Shell.h.

◆ m_optionsLayout

WindowLayout* Shell::m_optionsLayout
protected

options menu layout

Definition at line 195 of file Shell.h.

◆ m_pendingPop

Bool Shell::m_pendingPop
protected

TRUE when a pop is pending.

Definition at line 176 of file Shell.h.

◆ m_pendingPush

Bool Shell::m_pendingPush
protected

TRUE when a push is pending.

Definition at line 175 of file Shell.h.

◆ m_pendingPushName

AsciiString Shell::m_pendingPushName
protected

layout name to be pushed

Definition at line 177 of file Shell.h.

◆ m_popupReplayLayout

WindowLayout* Shell::m_popupReplayLayout
protected

replay save menu layout

Definition at line 194 of file Shell.h.

◆ m_saveLoadMenuLayout

WindowLayout* Shell::m_saveLoadMenuLayout
protected

save/load menu layout

Definition at line 193 of file Shell.h.

◆ m_schemeManager

ShellMenuSchemeManager* Shell::m_schemeManager
protected

The Shell Scheme Manager.

Definition at line 181 of file Shell.h.

◆ m_screenCount

Int Shell::m_screenCount
protected

of screens in screen stack

Definition at line 170 of file Shell.h.

◆ m_screenStack

WindowLayout* Shell::m_screenStack[MAX_SHELL_STACK]
protected

the screen layout stack

Definition at line 169 of file Shell.h.

◆ m_shellMapOn

Bool Shell::m_shellMapOn
protected

TRUE when the shell map is on.

Definition at line 179 of file Shell.h.


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