HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_Server Class Reference

#include <RE_Server.h>

Public Member Functions

 RE_Server ()
 
bool initServer ()
 
void flush () const
 
RE_IDType getFocusWindow () const
 
void setFocusWindow (RE_IDType wid)
 
bool meetsMinRes () const
 
bool windowUnderCursor (RE_IDType wid, int x, int y) const
 
bool getColorUnderCursor (float color[3]) const
 
bool makeCurrent (RE_WindowDrawable *draw, bool ignore_errors)
 
bool swapBuffers (RE_Window *currentWindow)
 
bool GLMakeCurrent (OGLDrawable draw, RE_OGLContext context, bool ignore_errors)
 ===================================================================== More...
 
bool GLSwapBuffers (RE_Window *currentWindow)
 
RE_OGLContext GLCurrentContext () const
 ===================================================================== More...
 
void GLWaitGL ()
 

Static Public Member Functions

static bool hasServer ()
 
static int getMinXRes ()
 
static int getMinYRes ()
 
static RE_IDType windowUnderCursor ()
 
static int getDragTolX ()
 
static int getDragTolY ()
 
static fpreal64 getDragDelay ()
 
static void toScreenCoords (int &x, int &y)
 
static void fromScreenCoords (int &x, int &y)
 
static int primaryScreenNum ()
 
static int numScreens ()
 
static int screenContaining (const QWidget *widget)
 
static int screenContaining (int x, int y, bool native=false)
 
static const UT_DimRectscreenArea (int screen_num)
 
static const UT_DimRectnativeScreenArea (int screen_num)
 
static const UT_DimRectworkArea (int screen_num)
 
static const UT_DimRectnativeWorkArea (int screen_num)
 
static const UT_DimRectdisplayScreenArea (int screen_num)
 
static const UT_DimRectdisplayWorkArea (int screen_num)
 
static fpreal screenToDeviceScale (int screen_num)
 
static fpreal physicalDPI (int screen_num)
 
static const UT_DimRectvirtualScreenArea ()
 
static const UT_DimRectvirtualWorkArea ()
 
void addCurrentMainWindow (RE_Window *win)
 
void removeCurrentMainWindow (RE_Window *win)
 Remove a window from the list of current main windows. More...
 
RE_WindowgetCurrentMainWindow () const
 
RE_WindowgetFirstCurrentMainWindow () const
 
SYS_NO_DISCARD_RESULT
UT_UniquePtr< RE_Window
newWindow (RE_DisplayMode mode, RE_WindowType type, RE_VisualType vis_type=RE_NORMAL_VIS)
 Creates a new RE_Window, ready to be opened. More...
 
RE_RendergetContextMatching (RE_DisplayMode mode) const
 
static void toScreenScale (int screen, int &value)
 
static void fromScreenScale (int screen, int &value)
 ===================================================================== More...
 
static bool isAppExiting ()
 
static void setAppExiting ()
 
static bool useNewWindowDrawable ()
 
static bool useNewUISkin ()
 

Detailed Description

Definition at line 32 of file RE_Server.h.

Constructor & Destructor Documentation

RE_Server::RE_Server ( )

Member Function Documentation

void RE_Server::addCurrentMainWindow ( RE_Window win)

Add a window to the list of current main windows. If it is already in the list, it will not be added again.

static const UT_DimRect& RE_Server::displayScreenArea ( int  screen_num)
static

Desktop support.

static const UT_DimRect& RE_Server::displayWorkArea ( int  screen_num)
static

Desktop support.

void RE_Server::flush ( ) const
static void RE_Server::fromScreenCoords ( int x,
int y 
)
static
static void RE_Server::fromScreenScale ( int  screen,
int value 
)
static

=====================================================================

bool RE_Server::getColorUnderCursor ( float  color[3]) const
RE_Render* RE_Server::getContextMatching ( RE_DisplayMode  mode) const

Returns current render context matching the mode passed in. All render contexts are tied to a specific drawable. This may return nullptr if there are no render contexts currently created that match mode.

RE_Window* RE_Server::getCurrentMainWindow ( ) const

Find the current main window that's focused, so you can attach dialog windows to it. If none is marked as focused, just returns the first window.

static fpreal64 RE_Server::getDragDelay ( )
inlinestatic

Definition at line 83 of file RE_Server.h.

static int RE_Server::getDragTolX ( )
inlinestatic

Definition at line 81 of file RE_Server.h.

static int RE_Server::getDragTolY ( )
inlinestatic

Definition at line 82 of file RE_Server.h.

RE_Window* RE_Server::getFirstCurrentMainWindow ( ) const

Find the first current main window, regardless of whether it's focused. Used on Windows to ensure that all subwindows are made tool windows of at least the main Houdini window.

RE_IDType RE_Server::getFocusWindow ( ) const
inline

Definition at line 42 of file RE_Server.h.

static int RE_Server::getMinXRes ( )
inlinestatic

Definition at line 45 of file RE_Server.h.

static int RE_Server::getMinYRes ( )
inlinestatic

Definition at line 46 of file RE_Server.h.

RE_OGLContext RE_Server::GLCurrentContext ( ) const

=====================================================================

bool RE_Server::GLMakeCurrent ( OGLDrawable  draw,
RE_OGLContext  context,
bool  ignore_errors 
)

=====================================================================

===================================================================== For OpenGL 2D UI drawing.

bool RE_Server::GLSwapBuffers ( RE_Window currentWindow)
void RE_Server::GLWaitGL ( )
static bool RE_Server::hasServer ( )
static
bool RE_Server::initServer ( )
static bool RE_Server::isAppExiting ( )
static

Return whether the Qt objects are valid or not. Qt objects are not valid when the Qt main event loop has exited.

bool RE_Server::makeCurrent ( RE_WindowDrawable draw,
bool  ignore_errors 
)

===================================================================== For new 2D UI drawing.

bool RE_Server::meetsMinRes ( ) const
static const UT_DimRect& RE_Server::nativeScreenArea ( int  screen_num)
static

Desktop support.

static const UT_DimRect& RE_Server::nativeWorkArea ( int  screen_num)
static

Desktop support.

SYS_NO_DISCARD_RESULT UT_UniquePtr<RE_Window> RE_Server::newWindow ( RE_DisplayMode  mode,
RE_WindowType  type,
RE_VisualType  vis_type = RE_NORMAL_VIS 
)

Creates a new RE_Window, ready to be opened.

static int RE_Server::numScreens ( )
static

Desktop support.

static fpreal RE_Server::physicalDPI ( int  screen_num)
static

Desktop support.

static int RE_Server::primaryScreenNum ( )
static

Desktop support.

void RE_Server::removeCurrentMainWindow ( RE_Window win)

Remove a window from the list of current main windows.

static const UT_DimRect& RE_Server::screenArea ( int  screen_num)
static

Desktop support.

static int RE_Server::screenContaining ( const QWidget *  widget)
static

Desktop support.

static int RE_Server::screenContaining ( int  x,
int  y,
bool  native = false 
)
static

Desktop support.

static fpreal RE_Server::screenToDeviceScale ( int  screen_num)
static

Desktop support.

static void RE_Server::setAppExiting ( )
static

This method should only be called when the Qt main event loop has exited. It lets RE know that it is no longer safe to work with any Qt objects.

void RE_Server::setFocusWindow ( RE_IDType  wid)
bool RE_Server::swapBuffers ( RE_Window currentWindow)
static void RE_Server::toScreenCoords ( int x,
int y 
)
static
static void RE_Server::toScreenScale ( int  screen,
int value 
)
static

Convert from a value that is scaled in Houdini UI space to a value that is scaled in screen space and vice versa. }@

static bool RE_Server::useNewUISkin ( )
static

Return true if Houdini should draw the new UI skin. Return false if Houdini should draw the traditional OpenGL UI skin. Note that if this method returns true, then useNewWindowDrawable() also returns true.

static bool RE_Server::useNewWindowDrawable ( )
static

Return true if Houdini should draw the UI using the new window drawable framework. Return false if Houdini should draw the UI with the traditional OpenGL drawable framework.

static const UT_DimRect& RE_Server::virtualScreenArea ( )
static

Desktop support.

static const UT_DimRect& RE_Server::virtualWorkArea ( )
static

Desktop support.

bool RE_Server::windowUnderCursor ( RE_IDType  wid,
int  x,
int  y 
) const

Determine if the given window (and not a child window) is currently under the mouse. The current x,y mouse coordinates are optional under certain platforms

static RE_IDType RE_Server::windowUnderCursor ( )
static

Return the id of the Houdini window that appears immediately underneath the mouse cursor. Return 0/nullptr if there is no Houdini window immediately underneath the mouse cursor.

static const UT_DimRect& RE_Server::workArea ( int  screen_num)
static

Desktop support.


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