[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    Window(3X) manual page Table of Contents

Name

ApplicationWindow, IconWindow, ManagedWindow, PopupWindow, TopLevelWindow, TransientWindow - window classes and window manager interactions

Synopsis

#include <ivplus/window.h>

Description

Window is an abstract base class that encapsulates the methods and data of the underlying X windows used by all interactors.

ManagedWindow is an abstract base class that extends the Window class to include interactions with Inter-Client Communications Conventions Manual (ICCCM ) compliant window managers.

ApplicationWindow is a class that is used for the application’s main window.

IconWindow is a class that handles iconified windows.

PopupWindow is a class that does not interact with the window manager, so it is derived from the Window class directly.

TopLevelWindow is a class that manages top level windows of the application other than the main window.

TransientWindow is a class that handles application windows that are meant to be temporary, such as dialog boxes. These windows will normally iconify along with an associated top level or main window.

A pointer to the ManagedWindow object associated with a top level interactor is returned by the Interactor operation GetTopLevelWindow().

Class Hierarchy


ApplicationWindow -> ManagedWindow -> Window
IconWindow -> ManagedWindow -> Window
PopupWindow -> Window
TopLevelWindow -> ManagedWindow -> Window
TransientWindow -> TopLevelWindow -> ManagedWindow -> Window

Constructors

Window(Glyph*)

ManagedWindow(Glyph*)

Since Window and ManagedWindow are abstract base classes, their constructors are protected.

ApplicationWindow(Glyph*)

IconWindow(Glyph*)

PopupWindow(Glyph*)

TopLevelWindow(Glyph*)

TransientWindow(Glyph*)

All of the constructors take a Glyph* parameter. In InterViews Plus, these windows are always associated with an Interactor object. Interactor is derived from Glyph.

Public Operations

Window class operations:

virtual void align(float x, float y)

Used in determining the size and placement of the window.

virtual void bind()

Binds the current window description to its X window counterpart, creating the X window if necessary.

virtual FloatCoord bottom() const

Returns the coordinate corresponding to the bottom edge of the window.

virtual boolean bound() const

Returns whether this window is bound. See bind() and unbind().

virtual Canvas* canvas() const

Returns the Canvas object associated with this window.

virtual void cursor(Cursor*)

Sets the cursor to be used when the mouse pointer is within the window’s borders.

virtual Cursor* cursor() const

Returns the cursor to be used when the mouse pointer is within the window’s borders.

virtual void display(Display*)

Sets the Display object associated with this window.

virtual Display* display() const

Returns the Display object associated with this window.

virtual Glyph* glyph() const

Returns a pointer to the glyph associated with this window.

virtual void grab_keyboard() const

Grabs the keyboard. Any keyboard events (including FocusIn and FocusOut events) are sent to this window regardless of where the keyboard focus was previously. To release the grab, use ungrab_keyboard().

virtual void grab_pointer(Cursor* = nil) const

Grabs the mouse pointer, optionally setting the cursor to be displayed during the grab. Any mouse events normally received by this window will be sent to it regardless of the location of the mouse pointer. To release the grab, use ungrab_pointer().

virtual boolean is_mapped() const

Returns whether or not this window is currently mapped.

virtual boolean isInteractorWindow()

Returns whether or not this window is associated with an Interactor object.

virtual FloatCoord left() const

Returns the coordinate corresponding to the left edge of the window.

virtual void lower()

Lowers this window with respect to the other windows on the display.

virtual void map()

Maps the window to the display.

virtual void move(FloatCoord left, FloatCoord bottom)

Moves the window to the indicated lower left coordinate.

virtual unsigned int pheight() const

Returns the height of the window in pixels.

virtual void place(FloatCoord left, FloatCoord bottom)

Sets the lower left coordinate of the window with respect to the World.

virtual void pplace(IntCoord left, IntCoord bottom)

Sets the lower left coordinate of the window with respect to the World.

virtual void push_cursor()

Pushes the current cursor onto the cursor stack.

virtual void pop_cursor()

Pops the last cursor from the cursor stack.

virtual void raise()

Raises this window with respect to the other windows on the display.

virtual void receive(const Event&)

Looks at an event that has been received for this window. Handles map, expose, and configure events.

WindowRep* rep() const

Returns a pointer to the WindowRep associated with this window. The WindowRep is a low-level X interface and would not normally be accessed. It is, therefore, not documented further.

virtual void repair()

Causes any damaged area to be redrawn.

virtual void resize()

Causes the window to resize itself.

virtual Handler* target(const Event&) const

Returns the Handler associated with the event’s target. For events that have no associated pointer location, it returns nil.

virtual void style(Style*)

Sets the Style object for this window.

Style* style() const

Returns the Style object associated with this window.

virtual void unbind()

Unbinds the window from its X window counterpart, removing the window from the window table. X will automatically destroy subwindows, so there is no need to destroy the window if it has a parent.

virtual void ungrab_keyboard() const

Ungrabs the keyboard. See grab_keyboard().

virtual void ungrab_pointer() const

Ungrabs the mouse pointer. See grab_pointer().

virtual void unmap()

Unmaps the window from the display.

ManagedWindow class operations:

virtual void deiconify()

Deiconifies this window.

virtual void display(Display*)

Sets the Display object associated with this window.

virtual Display* display() const

Returns the Display object associated with this window.

virtual void focus_event(Handler* in, Handler* out)

Sets handlers for FocusIn and FocusOut events.

virtual void icon(ManagedWindow*)

Sets a pointer to the ManagedWindow object that is used to display this window’s icon.

virtual ManagedWindow* icon() const

Returns a pointer to the ManagedWindow object that is used to display this window’s icon.

virtual void iconify()

Iconifies the window.

virtual void icon_bitmap(Bitmap*)

Sets the Bitmap object used when this window is iconified.

virtual Bitmap* icon_bitmap() const

Returns the Bitmap object used when this window is iconified.

virtual void icon_mask(Bitmap*)

Sets the Bitmap object used as a mask when this window is iconified.

virtual Bitmap* icon_mask() const

Returns the Bitmap object used as a mask when this window is iconified.

ManagedWindowRep* rep() const

Returns a pointer to the WindowRep associated with this Window. The ManagedWindowRep is a low-level X interface and would not normally be accessed. It is, therefore, not documented further.

virtual void resize()

Causes the window to resize itself.

virtual void wm_delete(Handler*)

Sets the handler to be called when a window manager delete signal is received.

TopLevelWindow class operations:

virtual void group_leader(Window* primary)

Sets this window’s group leader to primary.

virtual Window* group_leader() const

Returns this window’s group leader.

TransientWindow class operations:

virtual void transient_for(Window*)

Sets a pointer to the window which will act as this windows group leader. When the group leader is iconified, this window will also iconify. It is not possible to position this window behind its group leader.

virtual Window* transient_for() const

Returns a pointer to the window which will act as this windows group leader. When the group leader is iconified, this window will also iconify. It is not possible to position this window behind its group leader.

Protected Operations

Window class operations:

virtual void compute_geometry()

Calculates the size and placement of the window. By default, this operation does nothing.

virtual void configure()

Sets specific attributes for this window. By default, this operation does nothing.

virtual void default_geometry()

Calculates the size and placement of the window. By default, this operation does nothing.

virtual void do_map()

Causes the window to be raised, mapping it to the display.

virtual void set_attributes()

Sets common X window attributes such as the event mask, color map, and cursor.

virtual void set_props()

Sets window manager properties.

ManagedWindow class operations:

virtual void compute_geometry()

Calculates the size and placement of the window. By default, this operation does nothing.

virtual void set_props()

Sets window manager properties.

Application class operations:

virtual void compute_geometry()

Calculates the size and placement of the window. By default, this operation does nothing.

virtual void set_props()

Sets window manager properties.

TopLevelWindow class operations:

virtual void set_props()

Sets window manager properties.

TransientWindow class operations:

virtual void configure()

Sets specific attributes for this window. By default, this operation does nothing.

virtual void set_attributes()

Sets common X window attributes such as the event mask, color map, and cursor.

PopupWindow class operations:

virtual void set_attributes()

Sets common X window attributes such as the event mask, color map, and cursor.

IconWindow class operations:

virtual void do_map()

Overrides Window::do_map(). This operation does nothing.

X Resources

None.

Examples

None.

Files

window.h

See Also

Interactor(3X) , World(3X) .


Table of Contents