| 
    Cavestory Mod API
    
   | 
 
An external window to render stuff on. More...
#include <ExternalWindow.h>
Public Member Functions | |
| ExternalWindow () | |
| Constructor.  | |
| ~ExternalWindow () | |
| Deconstructor.  | |
| bool | Init (const char *pTitle, GUI_POINT *pPoint, GUI_POINT pSize, unsigned int iFlags=0, int iMagnification=-1, bool bStartHidden=false) | 
| Initialize this window.  More... | |
| void | Free () | 
| Reset this window and its memory.  | |
| bool | IsInitialized () | 
| Check to see if this window has been initialized.  More... | |
| void | UpdateFlags () | 
| Update a window's flags.  | |
| void | RegisterTexture (VideoTexture *pTexture) | 
| Register a texture to this window.  More... | |
| void | UnregisterTexture (VideoTexture *pTexture) | 
| Unregister a texture from this window.  More... | |
| void | SetWindowMinimumSize (GUI_POINT pSize) | 
| Set the minimum size for this window.  More... | |
| void | SetWindowMaximumSize (GUI_POINT pSize) | 
| Set the maximum size for this window.  More... | |
| void | SetWindowOpacity (unsigned char iOpacity) | 
| Set the opacity of this window.  More... | |
| unsigned char | GetWindowOpacity () | 
| Get the visibility of this window.  More... | |
| void | SetWindowVisible (bool bVisible) | 
| Set the visibility of this window.  More... | |
| bool | IsWindowVisible () | 
| Get the visibility of this window.  More... | |
| GUI_POINT | GetWindowPosition () | 
| Get the position of this window.  More... | |
| void | SetWindowPosition (GUI_POINT pNewPosition) | 
| Move this window.  More... | |
| GUI_POINT | GetWindowSize () | 
| Get the size of this window.  More... | |
| void | SetWindowSize (GUI_POINT pNewSize) | 
| Resize this window.  More... | |
| const char * | GetWindowTitle () | 
| Get the title of this window.  More... | |
| void | SetWindowTitle (const char *pNewTitle) | 
| Rename this window.  More... | |
| void | FocusWindow () | 
| Focus this window.  | |
| void | Maximize () | 
| Maximize this window.  | |
| void | Minimize () | 
| Minimize this window.  | |
| void | OnInputEvent (SDL_Event *pEvent) | 
| Handle an input.  More... | |
| void | SetHitTestFunc (ExternalWindow_HitTestFunc pFunc, void *pUserData) | 
| Set the hittest function.  More... | |
| GUI_POINT | GetMousePosition () | 
| Get the mouse position relative to this window.  More... | |
| SDL_Texture * | GetSurfaceTexture (Surface_Ids iSurfaceId) | 
| Get the texture specific to this window's renderer for a surface.  More... | |
| void | FlipWindow () | 
| Flip this window.  | |
Static Public Member Functions | |
| static bool | TestWindowInputFocus (ExternalWindow *pWindow) | 
| Test a window's input focus.  More... | |
| static bool | TestWindowMouseFocus (ExternalWindow *pWindow) | 
| Test a window's mouse focus.  More... | |
Public Attributes | |
| ExternalWindow * | prev | 
| Previous entry in list.  | |
| ExternalWindow * | next | 
| Next entry in list.  | |
| void * | CallbackUserData | 
| User data for callback.  | |
| ExternalWindow_OnResizeFunc | OnResize | 
| Called every time the window's size is changed.  | |
| ExternalWindow * | m_pParent | 
| This window's parent window.  More... | |
| ExternalWindow_HitTestFunc | m_pHitTestFunc | 
| A pointer to the hit test function.  | |
| void * | m_pHitTestUserData | 
| The user data for the hitfunc.  | |
| SDL_Renderer * | m_pRenderer | 
| The SDL renderer pointer for this window.  | |
| SDL_Window * | m_pWindow | 
| The SDL window pointer for this window.  | |
| unsigned int | m_iFlags | 
| The flags for this window.  More... | |
| EXTERNAL_WINDOW_TEXTURE | m_pTextureList [SURFACE_ID_MAX] | 
| Texture array for this window.  | |
| VideoTexture * | m_pRendererTexture | 
| The renderer texture for this external window.  More... | |
| struct { | |
| GUI_RECT WindowRect | |
| The window's rect.  | |
| int WindowID | |
| The window's ID.  | |
| } | m_pCache | 
| Cache variables stored for this window.  | |
Static Public Attributes | |
| static SDL_Window * | mouse_focused | 
| First entry in list.  | |
| static ExternalWindow * | first | 
| First entry in list.  | |
Protected Attributes | |
| bool | m_bInitialized | 
| Whether this window is initialized already or not.  | |
| VideoTexture ** | m_pVideoTextureList | 
| Texture allocated to this window.  | |
| int | m_iVideoTextureCount | 
| The number of textures allocated to this window.  | |
| int | m_iVideoTextureSize | 
| The number of texture slots allocated.  | |
An external window to render stuff on.
| GUI_POINT ExternalWindow::GetMousePosition | ( | ) | 
Get the mouse position relative to this window.
| SDL_Texture* ExternalWindow::GetSurfaceTexture | ( | Surface_Ids | iSurfaceId | ) | 
Get the texture specific to this window's renderer for a surface.
| iSurfaceId | The surface's ID. | 
| unsigned char ExternalWindow::GetWindowOpacity | ( | ) | 
Get the visibility of this window.
| GUI_POINT ExternalWindow::GetWindowPosition | ( | ) | 
Get the position of this window.
| GUI_POINT ExternalWindow::GetWindowSize | ( | ) | 
Get the size of this window.
| const char* ExternalWindow::GetWindowTitle | ( | ) | 
Get the title of this window.
| bool ExternalWindow::Init | ( | const char * | pTitle, | 
| GUI_POINT * | pPoint, | ||
| GUI_POINT | pSize, | ||
| unsigned int | iFlags = 0,  | 
        ||
| int | iMagnification = -1,  | 
        ||
| bool | bStartHidden = false  | 
        ||
| ) | 
Initialize this window.
| pTitle | The title of the window. | 
| pPoint | The initial position of the window. Pass 'NULL' here to center the window. | 
| pSize | The size of the window. | 
| iFlags | The initial flags for this window. | 
| iMagnification | The renderer magnification for this window. Setting this to '-1' will use the current magnification level. | 
| bStartHidden | If 'true', then the window will start out hidden, hiding the ugly initialization. | 
      
  | 
  inline | 
Check to see if this window has been initialized.
| bool ExternalWindow::IsWindowVisible | ( | ) | 
Get the visibility of this window.
| void ExternalWindow::OnInputEvent | ( | SDL_Event * | pEvent | ) | 
Handle an input.
| pEvent | The event to parse. | 
| void ExternalWindow::RegisterTexture | ( | VideoTexture * | pTexture | ) | 
Register a texture to this window.
| pTexture | The texture object. | 
| void ExternalWindow::SetHitTestFunc | ( | ExternalWindow_HitTestFunc | pFunc, | 
| void * | pUserData | ||
| ) | 
Set the hittest function.
| pFunc | The function. | 
| void ExternalWindow::SetWindowMaximumSize | ( | GUI_POINT | pSize | ) | 
Set the maximum size for this window.
| pSize | The new maximum size for this window. | 
| void ExternalWindow::SetWindowMinimumSize | ( | GUI_POINT | pSize | ) | 
Set the minimum size for this window.
| pSize | The new minimum size for this window. | 
| void ExternalWindow::SetWindowOpacity | ( | unsigned char | iOpacity | ) | 
Set the opacity of this window.
| iOpacity | The opacity of this window, from 0 (Invisible) to 255 (Visible). | 
| void ExternalWindow::SetWindowPosition | ( | GUI_POINT | pNewPosition | ) | 
Move this window.
| pNewPosition | The new position of the window. | 
| void ExternalWindow::SetWindowSize | ( | GUI_POINT | pNewSize | ) | 
Resize this window.
| pNewSize | The new size of the window. | 
| void ExternalWindow::SetWindowTitle | ( | const char * | pNewTitle | ) | 
Rename this window.
| pNewTitle | The new title of the window. | 
| void ExternalWindow::SetWindowVisible | ( | bool | bVisible | ) | 
Set the visibility of this window.
| bVisible | If 'true', then this window will be shown. Otherwise, this window will be hidden. | 
      
  | 
  static | 
Test a window's input focus.
| pWindow | The window to test. Set as 'NULL' test gWindow. | 
      
  | 
  static | 
Test a window's mouse focus.
| pWindow | The window to test. Set as 'NULL' test gWindow. | 
| void ExternalWindow::UnregisterTexture | ( | VideoTexture * | pTexture | ) | 
Unregister a texture from this window.
| pTexture | The texture object. | 
| unsigned int ExternalWindow::m_iFlags | 
The flags for this window.
Should be updated dynamically.
| ExternalWindow* ExternalWindow::m_pParent | 
This window's parent window.
If set to 'NULL', then it will be the child of the main window.
| VideoTexture* ExternalWindow::m_pRendererTexture | 
The renderer texture for this external window.
Allows one to draw directly to this window without using a middle-man texture.