Support Forum G3D Web Page |
Inherits G3D::GuiWindow.
Public Types | |
enum | CloseAction { NO_CLOSE, IGNORE_CLOSE, HIDE_ON_CLOSE, REMOVE_ON_CLOSE } |
Controls the behavior when the close button is pressed (if there is one). More... | |
enum | ModalEffect { MODAL_EFFECT_NONE, MODAL_EFFECT_DARKEN, MODAL_EFFECT_DESATURATE, MODAL_EFFECT_LIGHTEN } |
Controls rendering of the screen behind the window when this is a modal dialog. More... | |
Public Member Functions | |
virtual GuiDrawer * | addDrawer (const GuiText &caption="", GuiDrawer::Side side=GuiDrawer::RIGHT_SIDE) |
Drawers are like windows that slide out of the side of another GuiWindow. More... | |
virtual Rect2D | bounds () const |
Inherited from Surface2D. More... | |
const GuiText & | caption () const |
const Rect2D & | clientRect () const |
Interior bounds of the window, absolute on the OSWindow in GUI pixels. More... | |
virtual void | close () |
Take the specified close action. More... | |
virtual bool | contains (const Point2 &renderingPoint) const |
True if this point is within the region that the window considers for event delivery. More... | |
virtual float | depth () const |
Inherited from Surface2D. More... | |
bool | enabled () const |
virtual void | fireEvent (const GEvent &event) |
Fire an event on the containing window. More... | |
bool | focused () const |
Is this window in focus on the WidgetManager? More... | |
bool | hasMouseOver () const |
Is the mouse currently over this window? More... | |
WidgetManager * | manager () const |
const shared_ptr< ThirdPersonManipulator > & | manipulator () const |
const Vector2 & | minSize () const |
bool | morphing () const |
Returns true while a morph is in progress. More... | |
virtual void | morphTo (const Rect2D &r) |
Causes the window to change shape and/or position to meet the specified location. More... | |
virtual void | moveTo (const Vector2 &position) |
virtual void | moveToCenter () |
Move to the center of the screen. More... | |
virtual void | onAfterEvents () |
Invoked after all onEvent handlers for the current frame and before onUserInput for any other Widget. More... | |
virtual void | onAI () |
virtual void | onBeforeGraphics () |
Invoked by WidgetManager immediately before GApp::onGraphics runs. More... | |
virtual bool | onEvent (const GEvent &event) override |
The event is in OSWindow coordinates, NOT relative to this GuiWindow's rect. More... | |
virtual void | onNetwork () |
virtual void | onPose (Array< shared_ptr< Surface > > &surfaceArray, Array< shared_ptr< Surface2D > > &surface2DArray) override |
Appends a posed model for this object to the array, if it has a graphic representation. More... | |
virtual void | onSimulation (RealTime rdt, SimTime sdt, SimTime idt) override |
virtual void | onUserInput (UserInput *ui) |
virtual void | pack () |
Resize the pane so that all of its controls are visible and so that there is no wasted space, then resize the window around the pane. More... | |
GuiPane * | pane () |
const GuiPane * | pane () const |
float | pixelScale () const |
Size of a GUI pixel in rendering pixels. More... | |
virtual float | positionalEventZ (const Point2 &pixel) const |
The camera-space z position that this Widget considers this pixel to be at. More... | |
bool | preventEntitySelect () const |
const Rect2D & | rect () const |
Window bounds, including shadow and glow, absolute on the OSWindow in GUI pixels. More... | |
bool | resizable () const |
Can this window be resized by the user? More... | |
const SceneVisualizationSettings & | sceneVisualizationSettings () const |
shared_ptr< Entity > | selectedEntity () const |
String | selectedSceneName () const |
void | selectEntity (const shared_ptr< Entity > &e) |
virtual void | setCaption (const GuiText &text) |
virtual void | setDepth (float d) |
Called by the WidgetManager. More... | |
virtual void | setEnabled (bool e) |
void | setExpanded (bool e) |
void | setManager (WidgetManager *m) override |
Called by the WidgetManager when this module is added to it. More... | |
virtual void | setMinSize (const Vector2 &guiPixelSize) |
void | setPreventEntitySelect (bool b) |
virtual void | setRect (const Rect2D &r) override |
Set the border bounds relative to the OSWindow. More... | |
virtual void | setResizable (bool r) |
void | setShowLightSources (bool showLightSources) |
void | setSimulationPaused (bool p) |
void | setSimulationTimeScale (float t) |
void | setStyle (GuiTheme::WindowStyle style) |
Change the window style. More... | |
virtual void | setVisible (bool v) |
Hide this entire window. More... | |
void | showModal (OSWindow *osWindow, ModalEffect m=MODAL_EFFECT_DESATURATE) |
Blocks until the dialog is closed (visible = false) More... | |
void | showModal (const shared_ptr< GuiWindow > &parent, ModalEffect m=MODAL_EFFECT_DESATURATE) |
bool | simulationPaused () const |
const shared_ptr< GuiTheme > & | theme () const |
bool | visible () const |
virtual OSWindow * | window () const |
Returns the operating system window that is currently rendering this Widget. More... | |
Static Public Member Functions | |
static shared_ptr< SceneEditorWindow > | create (GApp *app, shared_ptr< Scene > scene, shared_ptr< GuiTheme > theme) |
static shared_ptr< GuiWindow > | create (const GuiText &windowTitle, const shared_ptr< GuiTheme > &theme=shared_ptr< GuiTheme >(), const Rect2D &rect=Rect2D::xywh(100, 100, 100, 50), GuiTheme::WindowStyle style=GuiTheme::NORMAL_WINDOW_STYLE, CloseAction close=NO_CLOSE) |
As controls are added, the window will automatically grow to contain them as needed. More... | |
static void | sort (Array< shared_ptr< Surface2D >> &array) |
Sorts from farthest to nearest. More... | |
static void | sortAndRender (RenderDevice *rd, Array< shared_ptr< Surface2D >> &array) |
Calls sort, RenderDevice::push2D, and then render on all elements. More... | |
Protected Types | |
enum | { CONTROL_WIDTH = 180 } |
Protected Member Functions | |
SceneEditorWindow (GApp *app, shared_ptr< Scene > scene, shared_ptr< GuiTheme > theme) | |
float | aoBias () const |
int | aoBlurRadius () const |
int | aoBlurStepSize () const |
float | aoDepthPeelSeparationHint () const |
float | aoEdgeSharpness () const |
bool | aoEnabled () const |
float | aoIntensity () const |
bool | aoMonotonicallyDecreasingBilateralWeights () const |
int | aoNumSamples () const |
float | aoRadius () const |
void | aoSetBias (float f) |
void | aoSetBlurRadius (int i) |
void | aoSetBlurStepSize (int i) |
void | aoSetDepthPeelSeparationHint (float f) |
void | aoSetEdgeSharpness (float f) |
void | aoSetEnabled (bool b) |
void | aoSetIntensity (float f) |
void | aoSetMonotonicallyDecreasingBilateralWeights (bool b) |
void | aoSetNumSamples (int i) |
void | aoSetRadius (float f) |
void | aoSetTemporalFilterFalloffEnd (float f) |
void | aoSetTemporalFilterFalloffStart (float f) |
void | aoSetTemporalFilterHysteresis (float f) |
void | aoSetTemporallyVarySamples (bool b) |
void | aoSetUseDepthPeelBuffer (bool b) |
void | aoSetUseNormalBuffer (bool b) |
void | aoSetUseNormalsInBlur (bool b) |
float | aoTemporalFilterFalloffEnd () const |
float | aoTemporalFilterFalloffStart () const |
float | aoTemporalFilterHysteresis () const |
bool | aoTemporallyVarySamples () const |
bool | aoUseDepthPeelBuffer () const |
bool | aoUseNormalBuffer () const |
bool | aoUseNormalsInBlur () const |
void | changeCameraCallback () |
Invoked by the GUI. More... | |
void | changeKeyFocus (GuiControl *oldControl, GuiControl *newControl) |
Fires events and updates keyFocusGuiControl. More... | |
void | checkForChanges () |
Checks to see if the scene changed. More... | |
void | duplicateSelectedEntity () |
Invoked by the GUI. More... | |
bool | editingSpline () const |
void | hideModal () |
void | increaseBounds (const Vector2 &extent) |
Called by GuiPane::increaseBounds() More... | |
void | loadSceneCallback () |
Invoked by the GUI. More... | |
void | makeGUI (GApp *app) |
void | onConvertToSplineTrack () |
void | onDrawerButton () |
void | onEntityDropDownAction () |
virtual void | onMouseButtonDown (const GEvent &event) |
Invoked from the default onEvent when a mouse click hits the back of a window that is not completely transparent. More... | |
void | onRateChange () |
void | onRemoveTrack () |
void | onSelectEntity () |
Invoked when m_selectedEntity changes. More... | |
bool | processMouseButtonDownEventForFocusChangeAndWindowDrag (const GEvent &event) |
Resolve the mouse button down event. More... | |
virtual void | render (RenderDevice *rd) const |
Inherited from Surface2D. More... | |
virtual void | renderBackground (RenderDevice *rd) const |
void | resetTime () |
Callback. More... | |
virtual bool | resizeFrameContains (const Point2 &guiPoint) const |
Does the resize area of the window contain this mouse point? More... | |
void | saveSceneCallback () |
Invoked by the GUI. More... | |
CFrame | selectedEntityFrame () const |
Callback for the GuiFrameBox. More... | |
String | selEntityMaterialName () const |
String | selEntityMeshName () const |
String | selEntityModelName () const |
String | selEntityName () const |
String | selEntityPartName () const |
void | selEntitySetMaterialName (const String &k) |
void | selEntitySetMeshName (const String &k) |
void | selEntitySetModelName (const String &k) |
void | selEntitySetName (const String &k) |
void | selEntitySetPartName (const String &k) |
int | selPrimIndex () const |
void | selSetPrimIndex (const int k) |
void | selSetU (const float k) |
void | selSetV (const float k) |
float | selU () const |
float | selV () const |
void | setKeyFocusControl (GuiControl *c) |
void | setKeyFocusOnNextControl () |
Called when tab is pressed. More... | |
void | setSelectedEntityFrame (const CFrame &f) |
Callback for the GuiFrameBox. More... | |
Static Protected Member Functions | |
template<class T , class ... ArgTypes> | |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
Like std::make_shared, but works for protected constructors. More... | |
Static Protected Attributes | |
static const Vector2 | s_defaultWindowSize |
static const Vector2 | s_expandedWindowSize |
Friends | |
class | _internal::EntitySelectWidget |
|
inherited |
Controls the behavior when the close button is pressed (if there is one).
NO_CLOSE - Do not show the close button IGNORE_CLOSE - Fire G3D::GEvent::GUI_CLOSE event but take no further action HIDE_ON_CLOSE - Set the window visibility to false and fire G3D::GEvent::GUI_CLOSE REMOVE_ON_CLOSE - Remove this GuiWindow from its containing WidgetManager and fire G3D::GEvent::GUI_CLOSE with a nullptr window argument (since the window may be garbage collected before the event is received).
Enumerator | |
---|---|
NO_CLOSE | |
IGNORE_CLOSE | |
HIDE_ON_CLOSE | |
REMOVE_ON_CLOSE |
|
inherited |
|
protected |
|
inlinevirtualinherited |
Drawers are like windows that slide out of the side of another GuiWindow.
Drawers are initially sized based on the side of the window that they slide out of, but they can be explicitly sized. Multiple drawers can be attached to the same side, however it is up to the caller to ensure that they do not overlap.
side | Side that the drawer sticks out of |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtualinherited |
Inherited from Surface2D.
Reimplemented from G3D::Widget.
|
inlineinherited |
Referenced by G3D::GuiWindow::addDrawer().
|
protected |
Invoked by the GUI.
|
protectedinherited |
Fires events and updates keyFocusGuiControl.
|
protected |
Checks to see if the scene changed.
If the scene did change, then this method updates the SceneEditorWindow GUI.
|
inlineinherited |
Interior bounds of the window, absolute on the OSWindow in GUI pixels.
|
virtualinherited |
Take the specified close action.
May be overriden.
Reimplemented in G3D::ArticulatedModelSpecificationEditorDialog.
|
virtualinherited |
True if this point is within the region that the window considers for event delivery.
Allows irregular window shapes. Default implementation returns true for all points inside rect().
renderingPoint | in rendering pixels (not GUI pixels) |
|
static |
|
staticinherited |
As controls are added, the window will automatically grow to contain them as needed.
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
|
virtualinherited |
Inherited from Surface2D.
Controls the depth of objects when rendering. Subclasses may override this but it can interfere with the normal handling of rendering and event delivery. depth = 0 is usually the "top" widget and depth = 1 is usually the "bottom" widget.
Reimplemented from G3D::Widget.
|
protected |
Invoked by the GUI.
|
protected |
|
inlineinherited |
|
virtualinherited |
Fire an event on the containing window.
Reimplemented in G3D::WidgetManager.
|
inlineinherited |
Is this window in focus on the WidgetManager?
|
inlineinherited |
Is the mouse currently over this window?
|
protectedinherited |
|
protectedinherited |
Called by GuiPane::increaseBounds()
|
protected |
Invoked by the GUI.
|
protected |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
Returns true while a morph is in progress.
|
virtualinherited |
Causes the window to change shape and/or position to meet the specified location.
The window will not respond to drag events while it is morphing.
|
virtualinherited |
|
virtualinherited |
Move to the center of the screen.
|
inlinevirtualinherited |
Invoked after all onEvent handlers for the current frame and before onUserInput for any other Widget.
Reimplemented in G3D::WidgetManager, and G3D::GameController.
|
inlinevirtualinherited |
Reimplemented from G3D::Widget.
Reimplemented in G3D::VideoRecordDialog.
|
inlinevirtualinherited |
Invoked by WidgetManager immediately before GApp::onGraphics runs.
Reimplemented in G3D::WidgetManager, G3D::CallbackWidget, and G3D::XRWidget.
|
protected |
|
protected |
|
protected |
|
overridevirtual |
The event is in OSWindow coordinates, NOT relative to this GuiWindow's rect.
Reimplemented from G3D::GuiWindow.
|
protectedvirtualinherited |
Invoked from the default onEvent when a mouse click hits the back of a window that is not completely transparent.
event | In rendering (not GUI) coordinates. |
|
inlinevirtualinherited |
Reimplemented from G3D::Widget.
Reimplemented in G3D::Discovery::Client.
|
overridevirtual |
Appends a posed model for this object to the array, if it has a graphic representation.
The posed model appended is allowed to reference the agent and is allowed to mutate if the agent is mutated.
Reimplemented from G3D::GuiWindow.
|
protected |
|
protected |
|
protected |
Invoked when m_selectedEntity changes.
|
overridevirtual |
Reimplemented from G3D::GuiWindow.
|
virtualinherited |
Reimplemented from G3D::Widget.
Reimplemented in G3D::CameraControlWindow.
|
virtualinherited |
Resize the pane so that all of its controls are visible and so that there is no wasted space, then resize the window around the pane.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Size of a GUI pixel in rendering pixels.
Default is 1.0f
Set greater than 1 on high-DPI displays to enlarge the GUI for this window only. Mouse events will be divided by this scale and graphics commands will be multiplied by it.
|
inlinevirtualinherited |
The camera-space z position that this Widget considers this pixel to be at.
Used for positional event (e.g., mouse click) delivery. Higher means closer.
Large negative values are far away. 0 is the closest 3D object. Values greater than zero are used for 2D objects. Returning fnan() [the default] requests the WidgetManager to set hte positionalEventZ to the object's normal event zorder.
See the implementation of ControlPointEditor::positionalEventZ for an example of how to use this with a 3D object.
Reimplemented in G3D::ControlPointEditor.
|
inline |
|
protectedinherited |
Resolve the mouse button down event.
Called from onEvent.
This is handled specially because it can change the focus. event is in rendering coordinates (not GUI coordinates)
|
inlineinherited |
Window bounds, including shadow and glow, absolute on the OSWindow in GUI pixels.
|
protectedvirtualinherited |
|
protectedvirtualinherited |
|
protected |
Callback.
|
inlineinherited |
Can this window be resized by the user?
|
protectedvirtualinherited |
Does the resize area of the window contain this mouse point?
|
protected |
Invoked by the GUI.
|
inline |
|
inline |
|
protected |
Callback for the GuiFrameBox.
String G3D::SceneEditorWindow::selectedSceneName | ( | ) | const |
void G3D::SceneEditorWindow::selectEntity | ( | const shared_ptr< Entity > & | e | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
virtualinherited |
|
inlinevirtualinherited |
Called by the WidgetManager.
This is the depth that the Widget is expected to use when posed as a Surface2D. Subclasses may override or ignore this but it can interfere with the normal handling of rendering.
|
inlinevirtualinherited |
Reimplemented in G3D::ControlPointEditor, and G3D::PhysicsFrameSplineEditor.
Referenced by G3D::PhysicsFrameSplineEditor::setEnabled().
void G3D::SceneEditorWindow::setExpanded | ( | bool | e | ) |
|
protectedinherited |
|
protectedinherited |
Called when tab is pressed.
|
overridevirtual |
Called by the WidgetManager when this module is added to it.
The argument may be nullptr
Reimplemented from G3D::Widget.
|
inlinevirtualinherited |
|
inline |
|
overridevirtual |
Set the border bounds relative to the OSWindow.
The window may render outside the bounds because of drop shadows and glows.
Reimplemented from G3D::GuiWindow.
|
inlinevirtualinherited |
|
protected |
Callback for the GuiFrameBox.
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Change the window style.
May lead to inconsistent layout.
|
inlinevirtualinherited |
Hide this entire window.
The window cannot have focus if it is not visible.
Removing the GuiWindow from the WidgetManager is more efficient than making it invisible.
Referenced by G3D::PhysicsFrameSplineEditor::setEnabled().
|
inherited |
Blocks until the dialog is closed (visible = false)
|
inherited |
|
inline |
Sorts from farthest to nearest.
|
staticinherited |
Calls sort, RenderDevice::push2D, and then render on all elements.
|
inlineinherited |
Referenced by G3D::ArticulatedModelSpecificationEditorDialog::create().
|
inlineinherited |
|
virtualinherited |
Returns the operating system window that is currently rendering this Widget.
Reimplemented in G3D::WidgetManager.
Referenced by G3D::FullScreenWidget::bounds().
|
friend |
|
protectedinherited |
|
protectedinherited |
Position at which the drag started.
|
protectedinherited |
True when the window is being dragged.
|
protectedinherited |
|
protectedinherited |
|
protected |
Referenced by setSimulationPaused(), and simulationPaused().
|
protected |
|
protected |
|
protected |
|
protectedinherited |
Client rect bounds in GUI pixels, absolute on the OSWindow, but at the redefined scale.
Referenced by G3D::GuiWindow::clientRect().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by G3D::Widget::depth(), and G3D::Widget::setDepth().
|
protected |
Button to expand and contract additional manual controls.
|
protected |
The button must be in its own pane so that it can float over the expanded pane.
|
protected |
|
protected |
|
protectedinherited |
Referenced by G3D::GuiWindow::enabled(), and G3D::GuiWindow::setEnabled().
|
protected |
|
protected |
Selection information for an entity.
|
protected |
If true, the window is big enough to show all controls.
|
protectedinherited |
Referenced by G3D::GuiWindow::focused().
|
protected |
Only one of frameEditor, trackEditor, and splineEditor is visible at a time.
|
protected |
Last time that the GUI was updated from the Scene.
|
protectedinherited |
The manager, set by setManager().
This cannot be a reference counted pointer because that would create a cycle between the Widget and its manager.
Referenced by G3D::Widget::manager(), G3D::GuiWindow::manager(), G3D::Widget::setManager(), and G3D::GuiWindow::setVisible().
|
protected |
For manipulating control points and frames.
Referenced by manipulator().
|
protectedinherited |
Referenced by G3D::GuiWindow::minSize(), and G3D::GuiWindow::setMinSize().
|
protectedinherited |
Referenced by G3D::GuiWindow::morphing().
|
protectedinherited |
Referenced by G3D::GuiWindow::hasMouseOver().
|
protectedinherited |
|
protected |
Custom controls added by each entity.
|
protectedinherited |
Size of a GUI pixel in rendering pixels.
Referenced by G3D::GuiWindow::pixelScale().
|
protected |
|
protected |
Referenced by preventEntitySelect(), and setPreventEntitySelect().
|
protected |
|
protectedinherited |
Window border bounds in GUI pixels.
Actual rendering may be outside these bounds.
Referenced by G3D::GuiWindow::rect().
|
protectedinherited |
Referenced by G3D::GuiWindow::resizable(), and G3D::GuiWindow::setResizable().
|
protectedinherited |
Referenced by G3D::GuiWindow::pane().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by selectedEntity().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by setShowLightSources().
|
protected |
Referenced by setSimulationTimeScale().
|
protected |
|
protected |
When editing a spline, this is the surface used for rendering.
|
protectedinherited |
Referenced by G3D::GuiWindow::setStyle().
|
protected |
|
protectedinherited |
Window label.
Referenced by G3D::GuiWindow::caption().
|
protectedinherited |
Referenced by G3D::GuiWindow::theme().
|
protected |
|
protectedinherited |
Is this window visible?
Referenced by G3D::GuiWindow::setVisible(), and G3D::GuiWindow::visible().
|
protected |
Referenced by sceneVisualizationSettings().
|
protectedinherited |
|
protectedinherited |
|
staticprotected |
|
staticprotected |