Class hierarchy   Compound list   Compound Members  

Component Class Reference

The base for all GUI components. More...

Inherited by BitmapComp and ColorPalette.

List of all members.

Public Members


Detailed Description

The base for all GUI components.

Provides default behaviour.


Member Function Documentation

Component::Component(int ContainerOnly=0)

Construct a component.

If it is only a container, it will not have a look (bitmap).

virtual long Component::add(World_Object* O) [virtual]

Add a component as a son.

virtual Enumeration Component::objects() [virtual]

Return an enumeration of all this's immediate subcomponents.

virtual Enumeration Component::revObjects() [virtual]

Return an enumeration of this's immmediate subcomponents in reverse order.

virtual long Component::clear() [virtual]

Removes all subcomponents of this.

virtual long Component::setLayout(LayoutManager* P) [virtual]

Set the layout manager for the subcomponets of this.

See GUI_Layout.h>

virtual long Component::arrange() [virtual]

Arrange the subcomponents using this's layout manager.

virtual Component* Component::getComponent(int x, int y) [virtual]

Returns a pointer to lowest level component (leaf) at the given coordinates (parent space).

virtual long Component::setMinimumSize(Vector2D& S) [virtual]

Set the minimum display size for this component.

The layout manager of this's parent will not size this component below this limit.

virtual Vector2D& Component::getMinimumSize() [virtual]

Get the minimum display size of this component.

virtual long Component::setPreferredSize(Vector2D& S) [virtual]

Set the preferred size of this component.

The layout manager of this's parent will favor this size, but may shink this to fit within the parent.

virtual Vector2D& Component::getPreferredSize() [virtual]

Get the preferred size of this component.

virtual long Component::setDimension(Vector2D& D) [virtual]

Set the display size of this component.

Note that arrange() of the layout manager of this's parent may change this size according to the MinimumSize and PreferedSize constraints.

virtual long Component::setDimension(int Width, int Height) [virtual]

Overloaded version of setDimension(Vector2D&).

virtual Vector2D& Component::getDimension() [virtual]

Get the display size of this component.

virtual Vector2D Component::getSize() [virtual]

Get the display size of this component.

Override for Object2D's method.

virtual int Component::getWidth() [virtual]

Get the display x-size of this component.

virtual int Component::getHeight() [virtual]

Get the display y-size of this component.

long Component::pack()

Set this component's display size to its minimum.

virtual void Component::createInsets() [virtual]

Called by getInsets() if no set of Insets has been created yet for this component.

See <GUI_Insets.h>

virtual Insets& Component::getInsets() [virtual]

Returns a reference to the Insets of this Component.

virtual long Component::setPosition(int x, int y) [virtual]

Set the position of this component in parent space.

virtual long Component::setPosition(Vector2D& P) [virtual]

Overloaded setPosition() for Vector2Ds.

virtual int Component::getX() [virtual]

Return x-coordinate of this component position in parent space.

virtual int Component::getY() [virtual]

Return y-coordinate of this component position in parent space.

virtual long Component::relocate(int dx, int dy) [virtual]

Move this component by a delta amount.

virtual long Component::relocate(Vector2D& d) [virtual]

Overloaded move for Vector2Ds.

virtual int Component::getRight() [virtual]

Get rightmost coordinate of this component in parent space.

virtual int Component::getBottom() [virtual]

Get bottommost coordinate of this component in parent space.

virtual int Component::isInside(int x, int y) [virtual]

Predicate that returns non-zero if the given coordinates (in parent space) are inside this component.

virtual int Component::isInside(Vector2D& P) [virtual]

Overloaded isInside() for Vector2Ds.

virtual long Component::render(View& view) [virtual]

Draws this component to the specified view.

virtual long Component::redraw() [virtual]

Called by render() if this component has been invalidated.

Updates the bitmap (sprite) for this component.

Reimplemented in BitmapComp.

virtual long Component::invalidate(int Recursive=0) [virtual]

This is called to "invalidate" this component.

It should be called if the compenent has changed its appearance and needs to be redrawn. If Recursive is non-zero, all subcomponents are invalidated also.

virtual long Component::validate() [virtual]

This is called by the default redraw() to reset this component's invalidation state.

virtual long Component::isValid() [virtual]

This predicate returns non-zero if this component does not need to be redrawn.

virtual long Component::setVisible(int Visible) [virtual]

Set the visibility state for this component.

If Visible is zero, this component will not be drawn and will receive no input events.

virtual long Component::isVisible() [virtual]

This predicate returns the visibility state of this component.

virtual void Component::setBackColor(TColor Color, int Recursive=0) [virtual]

Set the background color of this component.

If Recursive is non-zero, the background color change is applied to all subcomponents also.

virtual TColor Component::getBackColor() [virtual]

Returns the background color of this component.

virtual void Component::setFrontColor(TColor Color, int Recursive=0) [virtual]

Set the foreground color of this component.

If Recursive is non-zero, the foreground color change is applied to all subcomponents also.

virtual TColor Component::getFrontColor() [virtual]

Returns the foreground color of this component.

virtual long Component::mouseDown(int x, int y, int Flags) [virtual]

Called when a "mouse down" event occurs within this component.

x & y specify the cotrrdinates of the event in parent space. See <GUI_Manager.h> for Flags.

virtual long Component::mouseUp(int x, int y, int Flags) [virtual]

Called when a "mouse up" event occurs within this component.

virtual long Component::mouseMove(int x, int y, int Flags) [virtual]

Called when a "mouse move" event occurs within this component.

virtual long Component::mouseEnter(int x, int y, int Flags) [virtual]

Called when the mouse pointer is moved into this component.

virtual long Component::mouseExit(int x, int y, int Flags) [virtual]

Called when the mouse pointer is moved out of this component.

virtual long Component::mouseDrag(int x, int y, int Flags) [virtual]

Called when the mouse pointer is dragged (left button down during movement) within this component.

virtual long Component::keyDown(int Key, int Flags) [virtual]

Called when a "key down" event occurs while this component has the "focus".

See <GUI_Manager.h> for Flags.

Reimplemented in BitmapComp.

virtual long Component::keyUp(int Key, int Flags) [virtual]

Called when a "key up" event occurs while this component has the "focus".

See <GUI_Manager.h> for Flags.

virtual void Component::enable() [virtual]

Called to enable this component.

A component must be enabled in order to receive input events.

virtual void Component::disable() [virtual]

Called to disable this component (prevents it from receiving input events.

virtual long Component::isEnabled() [virtual]

This predicate returns non-zero if this component is "enabled".

virtual long Component::gotFocus() [virtual]

Called to notify this component that it has received the input focus.

virtual long Component::lostFocus() [virtual]

Notifies this component when it has lost the focus.

virtual long Component::hasFocus() [virtual]

Predicate that will return non-zero if this component has the focus.

virtual long Component::requestFocus(Component* Son=NULL) [virtual]

This can be called by a component to request the focus (when Son == NULL).

If Son != NULL, focus is being requested by a descendant.

virtual void Component::dump(ostream& os, int indent) [virtual]

Diagnostics utility.

Default writes to the given stream this component's typename and that of it's layout manager (if any) and then it is recursively invoked on its subcomponents with indent increased by 2.


The documentation for this class was generated from the following file: