GLOW API version 1.0 reference

Back to
Table of contents


class GlowFixedSizeWindow

General information

type: class
inherits: GlowWindow
module: glowUtilities

GlowFixedSizeWindow is a toplevel window that remains a fixed size. GLUT doesn't provide facilities for informing the window manager to prevent a window from being resized. However, if a GlowFixedSizeWindow is resized, either by the user through the window manager, or by a call to Reshape(), the window will "snap" back to its original "fixed" size. To actually resize the window, and set a new fixed size, use ForceReshape().

GLOW programs that want non-resizeable windows should use this class. Applications include widget palettes and other dialog boxes.

Methods

Constructors and destructor

GlowFixedSizeWindow(const GlowWindowParams& params)

Creates a new GlowFixedSizeWindow with options specified by the given params. Essentially behaves like the corresponding constructor from GlowWindow, except the width and height parameters also set the fixed size.

GlowFixedSizeWindow(const char* title, int x, int y, int width, int height, Glow::BufferType mode, Glow::EventMask eventMask)

Creates a new GlowFixedSizeWindow with options specified by the given params. Essentially behaves like the corresponding constructor from GlowWindow, except width and height also set the fixed size.

GlowFixedSizeWindow(void)

Creates a new GlowFixedSizeWindow but does not initialize it. A window created in this way may not be used until its Init() method is called.

void Init(const GlowWindowParams& params)

Initializes the GlowFixedSizeWindow with options specified by the given params. Essentially behaves like the corresponding method from GlowWindow, except the width and height parameters also set the fixed size.

void Init(const char* title, int x, int y, int width, int height, Glow::BufferType mode, Glow::EventMask eventMask)

Initializes the GlowFixedSizeWindow with options specified by the given params. Essentially behaves like the corresponding method from GlowWindow, except width and height also set the fixed size.

virtual ~GlowFixedSizeWindow(void)

The destructor for GlowFixedSizeWindow simply calls the GlowWindow destructor.

Methods for fixed-size windows

void ForceReshape(int width, int height)

Forces the window to assume a new size. The fixed size is set to this new size also.

int FixedWidth(void)

Returns the fixed width associated with the window.

int FixedHeight(void)

Returns the fixed height associated with the window.

Inherited methods
These methods are inherited from GlowWindow.

void Maximize(void)

You should not normally try to maximize a fixed-size window. It will momentarily maximize, but will then snap to its original size.

void Iconify(void)

const char* GetTitle(void) const

void SetTitle(const char* title)

const char* GetIconTitle(void) const

void SetIconTitle(const char* title)

Inherited methods
These methods are inherited from GlowSubwindow.

int PositionX(void) const

Note: for a toplevel window, this returns the same value as GlobalPositionX.

int PositionY(void) const

Note: for a toplevel window, this returns the same value as GlobalPositionY.

int GlobalPositionX(void) const

int GlobalPositionY(void) const

int Width(void) const

int Height(void) const

void Move(int x, int y)

void Reshape(int width, int height)

You should not normally try to reshape a fixed-size window. It will momentarily change size, but will then snap to its original size. Use ForceReshape() instead.

void Raise(void)

void Lower(void)

void Show(void)

void Hide(void)

void Refresh(void)

void SetRefreshEnabled(bool enabled)

bool IsRefreshEnabled(void) const

void SetAutoSwapBuffersEnabled(bool enabled)

bool IsAutoSwapBuffersEnabled(void) const

void NormalizeCoordinates(int x, int y, GLfloat& xn, GLfloat& yn) const

Glow::BufferType GetBufferType(void) const

GlowMenu* GetMenu(Glow::MouseButton mouseButton) const

void SetMenu(Glow::MouseButton mouseButton, GlowMenu* menu = 0)

void UnsetMenu(Glow::MouseButton mouseButton)

int GetCursor(void) const

void SetCursor(int cursor)

Glow::EventMask GetEventMask(void) const

Glow::EventMask GetInactiveEventMask(void) const

void SetEventMask(Glow::EventMask mask)

void SetInactiveEventMask(Glow::EventMask mask)

int GlutWindowNum(void) const

void MakeCurGlutWindow(void)

int GlutInfo(int whichInfo) const

Inherited methods
These methods are inherited from GlowComponent.

void Close(void)

GlowComponent* Parent(void) const

Note: For a toplevel window, Parent() returns 0.

GlowSubwindow* WhichWindow(void)

Note: For a toplevel window, WhichWindow() returns this.

GlowSubwindow* ParentWindow(void) const

Note: For a toplevel window, ParentWindow() returns 0.

GlowWindow* ToplevelWindow(void)

Note: For a toplevel window, ToplevelWindow() returns this.

bool IsToplevel(void) const

Note: For a toplevel window, returns true.

GlowComponent* Next(void) const

GlowComponent* Prev(void) const

int NumChildren(void) const

GlowComponent* FirstChild(void) const

GlowComponent* LastChild(void) const

void ReorderChild(GlowComponent* child, GlowComponent* pos)

void KillChildren(void)

void Activate(void)

void Deactivate(void)

bool IsActive(void)

bool IsInactive(void)

bool IsActiveStandby(void)

void Paint(void)

Overrideable methods

Inherited methods
These overrideable methods are inherited from GlowSubwindow.

virtual void OnMouseDown(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)

virtual void OnMouseUp(Glow::MouseButton mouseButton, int x, int y, Glow::Modifiers modifiers)

virtual void OnMenuDown(int x, int y)

virtual void OnMenuUp()

virtual void OnMouseMotion(int x, int y)

virtual void OnMouseDrag(int x, int y)

virtual void OnMouseEnter(void)

virtual void OnMouseExit(void)

virtual void OnKeyboard(Glow::KeyCode key, int x, int y, Glow::Modifiers modifiers)

virtual void OnDirectMenuHit(const GlowMenuMessage& message)

virtual void OnReshape(int width, int height)

This method is used by GlowFixedSizeWindow to snap the size back to the canonical size. Normally, you should not override it.

virtual void OnInvisible(void)

virtual void OnVisible(void)

Inherited methods
These overrideable methods are inherited from GlowComponent.

virtual bool OnBeginPaint(void)

virtual void OnEndPaint(void)

virtual void OnActivate(void)

virtual void OnDeactivate(void)


Back to
Table of contents


The GLOW Toolkit