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 ()
 
 ~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 GLMakeCurrent (OGLDrawable draw, RE_OGLContext context, bool ignore_errors)
 
RE_OGLContext GLCurrentContext () const
 
int GLMakeCopyCurrent (OGLDrawable draw, RE_OGLContext sourceContext, RE_OGLContext targetContext)
 
bool GLSwapBuffers (RE_Window *currentWindow)
 
OGLDrawable GLGetCurrentDrawable ()
 
void GLWaitGL ()
 

Static Public Member Functions

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 (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)
 
static bool isAppExiting ()
 
static void setAppExiting ()
 

Detailed Description

Definition at line 30 of file RE_Server.h.

Constructor & Destructor Documentation

RE_Server::RE_Server ( )
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

The current main windows are all the toplevel application windows. We keep track of them to find out what window we should use when creating dialogs - windowing systems can decorate and treat dialog windows differently if they know which window is the parent.

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 74 of file RE_Server.h.

static int RE_Server::getDragTolX ( )
inlinestatic

Definition at line 72 of file RE_Server.h.

static int RE_Server::getDragTolY ( )
inlinestatic

Definition at line 73 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 40 of file RE_Server.h.

static int RE_Server::getMinXRes ( )
inlinestatic

Definition at line 43 of file RE_Server.h.

static int RE_Server::getMinYRes ( )
inlinestatic

Definition at line 44 of file RE_Server.h.

RE_OGLContext RE_Server::GLCurrentContext ( ) const
OGLDrawable RE_Server::GLGetCurrentDrawable ( )
int RE_Server::GLMakeCopyCurrent ( OGLDrawable  draw,
RE_OGLContext  sourceContext,
RE_OGLContext  targetContext 
)
bool RE_Server::GLMakeCurrent ( OGLDrawable  draw,
RE_OGLContext  context,
bool  ignore_errors 
)
bool RE_Server::GLSwapBuffers ( RE_Window currentWindow)
void RE_Server::GLWaitGL ( )
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::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 ( 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)
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 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: