NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::Window Class Reference

#include <Window.hpp>

Classes

struct  Event
 
class  Listener
 

Public Types

enum  EventType {
  EventType_AddListener, EventType_RemoveListener, EventType_Close, EventType_Resize,
  EventType_KeyDown, EventType_KeyUp, EventType_Char, EventType_Mouse,
  EventType_Paint, EventType_PrePaint, EventType_PostPaint, EventType_DropFiles,
  EventType_PasteFiles, EventType_PasteImage
}
 

Public Member Functions

 Window (void)
 
 ~Window (void)
 
void setTitle (const String &title)
 
void setSize (const Vec2i &size)
 
Vec2i getSize (void) const
 
void setVisible (bool visible)
 
bool isVisible (void) const
 
void setFullScreen (bool isFull)
 
bool isFullScreen (void) const
 
void toggleFullScreen (void)
 
void realize (void)
 
void setGLConfig (const GLContext::Config &config)
 
const GLContext::ConfiggetGLConfig (void) const
 
GLContextgetGL (void)
 
HWND getHandle (void) const
 
void repaint (void)
 
void repaintNow (void)
 
void requestClose (void)
 
void enableDrop (bool enable)
 
void enablePaste (bool enable)
 
void addListener (Listener *listener)
 
void removeListener (Listener *listener)
 
void removeListeners (void)
 
bool isKeyDown (const String &key) const
 
bool isMouseKnown (void) const
 
bool isMouseDragging (void) const
 
const Vec2igetMousePos (void) const
 
void showMessageDialog (const String &title, const String &text)
 
String showFileDialog (const String &title, bool save, const String &filters="", const String &initialDir="", bool forceInitialDir=false)
 
String showFileLoadDialog (const String &title, const String &filters="", const String &initialDir="", bool forceInitialDir=false)
 
String showFileSaveDialog (const String &title, const String &filters="", const String &initialDir="", bool forceInitialDir=false)
 
Array< StringshowDirLoadDialog (const String &title, const String &initialDir="")
 
void showModalMessage (const String &msg)
 

Static Public Member Functions

static void staticInit (void)
 
static void staticDeinit (void)
 
static HWND createHWND (void)
 
static UPTR setWindowLong (HWND hwnd, int idx, UPTR value)
 
static int getNumOpen (void)
 
static void realizeAll (void)
 
static void pollMessages (void)
 
static void traverseDirectory (const char *root, Array< String > &names)
 

Detailed Description

Definition at line 41 of file Window.hpp.

Member Enumeration Documentation

Enumerator
EventType_AddListener 
EventType_RemoveListener 
EventType_Close 
EventType_Resize 
EventType_KeyDown 
EventType_KeyUp 
EventType_Char 
EventType_Mouse 
EventType_Paint 
EventType_PrePaint 
EventType_PostPaint 
EventType_DropFiles 
EventType_PasteFiles 
EventType_PasteImage 

Definition at line 47 of file Window.hpp.

Constructor & Destructor Documentation

Window::Window ( void  )

Definition at line 54 of file Window.cpp.

Window::~Window ( void  )

Definition at line 85 of file Window.cpp.

Member Function Documentation

void Window::addListener ( Listener listener)

Definition at line 282 of file Window.cpp.

HWND Window::createHWND ( void  )
static

Definition at line 550 of file Window.cpp.

void Window::enableDrop ( bool  enable)

Definition at line 268 of file Window.cpp.

void Window::enablePaste ( bool  enable)

Definition at line 275 of file Window.cpp.

GLContext * Window::getGL ( void  )

Definition at line 203 of file Window.cpp.

const GLContext::Config& FW::Window::getGLConfig ( void  ) const
inline

Definition at line 112 of file Window.hpp.

HWND FW::Window::getHandle ( void  ) const
inline

Definition at line 115 of file Window.hpp.

const Vec2i& FW::Window::getMousePos ( void  ) const
inline

Definition at line 131 of file Window.hpp.

static int FW::Window::getNumOpen ( void  )
inlinestatic

Definition at line 145 of file Window.hpp.

Vec2i Window::getSize ( void  ) const

Definition at line 129 of file Window.cpp.

bool FW::Window::isFullScreen ( void  ) const
inline

Definition at line 107 of file Window.hpp.

bool FW::Window::isKeyDown ( const String key) const
inline

Definition at line 128 of file Window.hpp.

bool FW::Window::isMouseDragging ( void  ) const
inline

Definition at line 130 of file Window.hpp.

bool FW::Window::isMouseKnown ( void  ) const
inline

Definition at line 129 of file Window.hpp.

bool FW::Window::isVisible ( void  ) const
inline

Definition at line 105 of file Window.hpp.

void Window::pollMessages ( void  )
static

Definition at line 593 of file Window.cpp.

void Window::realize ( void  )

Definition at line 184 of file Window.cpp.

void Window::realizeAll ( void  )
static

Definition at line 584 of file Window.cpp.

void Window::removeListener ( Listener listener)

Definition at line 293 of file Window.cpp.

void Window::removeListeners ( void  )

Definition at line 304 of file Window.cpp.

void Window::repaint ( void  )

Definition at line 216 of file Window.cpp.

void Window::repaintNow ( void  )

Definition at line 223 of file Window.cpp.

void Window::requestClose ( void  )

Definition at line 261 of file Window.cpp.

void Window::setFullScreen ( bool  isFull)

Definition at line 147 of file Window.cpp.

void Window::setGLConfig ( const GLContext::Config config)

Definition at line 195 of file Window.cpp.

void Window::setSize ( const Vec2i size)

Definition at line 106 of file Window.cpp.

void Window::setTitle ( const String title)

Definition at line 95 of file Window.cpp.

void Window::setVisible ( bool  visible)

Definition at line 138 of file Window.cpp.

UPTR Window::setWindowLong ( HWND  hwnd,
int  idx,
UPTR  value 
)
static

Definition at line 573 of file Window.cpp.

Array< String > Window::showDirLoadDialog ( const String title,
const String initialDir = "" 
)

Definition at line 455 of file Window.cpp.

String Window::showFileDialog ( const String title,
bool  save,
const String filters = "",
const String initialDir = "",
bool  forceInitialDir = false 
)

Definition at line 321 of file Window.cpp.

String FW::Window::showFileLoadDialog ( const String title,
const String filters = "",
const String initialDir = "",
bool  forceInitialDir = false 
)
inline

Definition at line 135 of file Window.hpp.

String FW::Window::showFileSaveDialog ( const String title,
const String filters = "",
const String initialDir = "",
bool  forceInitialDir = false 
)
inline

Definition at line 136 of file Window.hpp.

void Window::showMessageDialog ( const String title,
const String text 
)

Definition at line 312 of file Window.cpp.

void Window::showModalMessage ( const String msg)

Definition at line 487 of file Window.cpp.

void Window::staticDeinit ( void  )
static

Definition at line 535 of file Window.cpp.

void Window::staticInit ( void  )
static

Definition at line 502 of file Window.cpp.

void FW::Window::toggleFullScreen ( void  )
inline

Definition at line 108 of file Window.hpp.

void Window::traverseDirectory ( const char *  root,
Array< String > &  names 
)
static

Definition at line 609 of file Window.cpp.


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