InterViews Reference Manual -- WorldView
NAME
WorldView - manipulate root scene
SYNOPSIS
#include <InterViews/worldview.h>
DESCRIPTION
WorldView is a class for writing window managers that
manipulate a root scene. The operations manipulate objects of type
RemoteInteractor, which are interactors that exist in a
different address space than the window manager. Typically, a subclass of
WorldView is defined that handles input events according to a
particular window manager style.
PUBLIC OPERATIONS
WorldView(World*, Sensor*, Painter*)
Define a worldview interactor associated with a given world, and pass the
sensor and painter to the interactor constructor.
RemoteInteractor Find(Coord x, Coord y)
Return the interactor under the given (absolute) coordinates.
RemoteInteractor Choose(Cursor*, bool waitforup = true)
Interactively choose an interactor by changing the cursor to the given one and
waiting for a button to be pressed. If waitforup is true, then wait
until the button is released before returning.
virtual void InsertRemote(RemoteInteractor)
Handle a request from an application (process) to insert an interactor into the
root scene. The default operation is a nop.
virtual void ChangeRemote(RemoteInteractor, Coord left,
Coord top, int w, int h
Handle a request from an application (process) to change an interactor's canvas
to the specified position and size. The default operation is simply to perform
a Change operation with the given parameters.
void Move(RemoteInteractor, Coord left, Coord top)
void Change(RemoteInteractor, Coord left, Coord top,
int w, int h)
The Move operation sets the interactors position given the upper left corner.
Change both moves and resizes the interactor.
void Raise(RemoteInteractor)
Raise the interactor's canvas to be above all others on the screen.
void Lower(RemoteInteractor)
Lower the interactor's canvas to be below all others on the screen.
void Focus(RemoteInteractor)
Set input focus to the interactor. If nil is passed, the input focus is based
on the location of the pointing device.
RemoteInteractor GetFocus()
Return the current interactor that has input focus (or nil if none).
void GetList(RemoteInteractor*&, int&)
Return all the top-level interactors and a count of how many there are. The
space for the list is automatically allocated.
void FreeList(RemoteInteractor*)
Free the space allocated by a GetList call.
void GetInfo(RemoteInteractor, Coord& x1, Coord& y1, Coord& x2, Coord&
y2)
Get the current position of an interactor.
RemoteInteractor GetIcon(RemoteInteractor)
Gets the icon for the specified Interactor. If the argument Interactor is an
icon, then GetIcon gets the original Interactor.
void AssignIcon(RemoteInteractor i, RemoteInteractor icon)
Associate icon as the icon interactor for i.
void UnassignIcon(RemoteInteractor)
Remove the icon association for the given interactor.
char* GetName(RemoteInteractor)
Returns the name of the Interactor (as set by Scene::SetIcon(const char*)).
RedrawAll()
Force all the interactors on the screen to redraw themselves.
PROTECTED OPERATIONS
void GrabMouse(Cursor*)
void
UngrabMouse()
Get or release control of the pointing device. GrabMouse will wait until the
device is available and then sets the cursor to the given cursor.
bool GrabButton(unsigned mask, Cursor*)
void
UngrabButton(unsigned mask)
Get or release control of a button or set of buttons. The cursor is used when
the button is pressed. GrabButton returns false if the button is not
available. The button mask is defined by the constants in
``<InterViews/Xlib.h>''.
void Lock()
void Unlock()
Get or release exclusive access to the server. While locked, the server will
ignore other clients.
void ClearInput()
Discard any pending input events.
void MoveMouse(Coord x, Coord y)
Set the pointing device position to the given screen coordinates.
SEE ALSO
Interactor , Scene
Next: [none]
| Prev: World
| Up: index
| Top: index