Skip to main content.

Infomation Retrieval Functions

These functions are provided to extract infomation from the Window Manager

SetCurrent

Function Prototypes

  • void SetCurrent(winHnd window)
    Sets the given window as the current Window Manager window and the current drawing context for that thread.

Return Value

  • None

Possible Known Exceptions

  • std::runtime_error

Other Details / Notes

  • If you pass an invalid window handle in the function wont do anything and the window which was current before will remain so.
  • If the target window fails to become current for some reason it will throw std::runtime_error

Show

Function Prototypes

  • void Show(bool vis = true) const
    Sets the current windows visability state.
  • void Show(winHnd window, bool vis = true) const
    Sets the requested windows visability state.

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • If the window handle is invalid then the function doesnt do anything.

Hide

Function Prototypes

  • void Hide(bool vis = false) const
    Sets the current windows visability state.
  • void Hide(winHnd window, bool vis = false) const
    Sets the requested windows visability state.

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • If the window handle is invalid then the function doesnt do anything.

IsVisible

Function Prototypes

  • bool IsVisible() const
    Returns the visability state of the current window
  • bool IsVisible(winHnd window) const
    Returns the visability state of the requested window

Return Value

  • True indicating the window is visable
  • False indicating the window is hidden

Possible Known Exceptions

  • None

Other Details / Notes

  • If an invalid window handle is passed then the function returns false

SetWindowSize

Function Prototypes

  • void SetWindowSize(int width, int height) const
    Sets the width and height of the current window.
  • void SetWindowSize(winHnd window, int width, int height) const
    Sets the width and height of the requested window

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • None

GetWindowSize

Function Prototypes

  • void GetWindowSize(int &width, int &height) const
    Returns the width & height of the current window
  • void GetWindowSize(winHnd window,int &width, int &height) const
    Returns the width & height of the requested window

Return Value

  • Width and height are placed in the supplied varibles.

Possible Known Exceptions

  • None

Other Details / Notes

  • If the window requested isnt valid then the width and height varibles will remain unchanged.

SwapBuffers

Function Prototypes

  • void SwapBuffers() const;
    Instructs the current window to exchange its front and back buffers.
  • void SwapBuffers(winHnd window) const;
    Instructs the requested window to exchange its front and back buffers.

Return Value

  • None

Possible Known Exceptions

  • std::runtime_error

Other Details / Notes

  • If the supplied window handle is invalid then the function doesnt do anything.
  • If the requested window isnt the current window then it is made current, told to swap and then the old current is reinstated as the OpenGL Context.
  • If the function has to make a different window to the current one current then it could throw an std::runtime_error if the swap can not be made.

ShareData

Function Prototypes

  • void ShareData(winHnd src, winHnd dest) const
    Shares data, such as display lists and textures, between the source window (src) and the destination window (dest)

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • None

SetWindowPosition

Function Prototypes

  • void SetWindowPosition(int x, int y) const
    Sets the X and Y position of the current window.
  • void SetWindowSize(winHnd window, int width, int height) const
    Sets the X and Y position of the requested window

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • None

GetWindowPosition

Function Prototypes

  • void GetWindowPosition(int &x, int &y) const
    Returns the X and Y position of the current window
  • void GetWindowPosition(winHnd window,int &width, int &height) const
    Returns the X and Y position of the requested window

Return Value

  • X and Y position are placed in the supplied varibles.

Possible Known Exceptions

  • None

Other Details / Notes

  • If the window requested isnt valid then the x and y varibles will remain unchanged.

SetWindowTitle

Function Prototypes

  • void SetWindowTitle(std::string &title) const
    Sets the title of the current window.
  • void SetWindowTitle(winHnd window, std::string &title) const
    Sets the title of the requested window

Return Value

  • None

Possible Known Exceptions

  • None

Other Details / Notes

  • None

Copyright © 2004, Rob Jones
Home | Site Map | Contact Us | Disclaimer | Privacy Statement