TView Class Reference

[tvision Index] [tvision Hierarchy] [Headers]


The base of all visible objects More...

#include <views.h>

Inherits: TObject, TStreamable

Public Members

Protected Members


Detailed Description

The base of all visible objects.


enum phaseType ( phFocused, phPreProcess, phPostProcess ) [public]

YYY

enum selectMode ( normalSelect, enterSelect, leaveSelect ) [public]

YYY

TView( const TRect& bounds ) [public]

Constructor.

Parameter `bounds' will be the bounding rectangle of the view.

~TView() [public]

Destructor.

void sizeLimits( TPoint& min, TPoint& max ) [public virtual]

Gets the minimum and maximum size limits of the view.

TRect getBounds() [public]

Returns the bounding rectangle of the view.

`a' is set to `origin' and `b' is set to `origin' + `size'.

TRect getExtent() [public]

Returns the size of the view.

`a' is set to 0,0 and `b' is set to `size'.

TRect getClipRect() [public]

Returns the smaller rectangle which needs to be redrawn in a draw() call.

For complex views, you may use this method inside draw() to achieve better speed performances.

See Also:
TView::draw

Boolean mouseInView( TPoint mouse ) [public]

Returns True if the coordinate `mouse' is inside this view.

`mouse' is defined in the global coordinate system.

See Also:
TView::makeGlobal, TView::makeLocal

Boolean containsMouse( TEvent& event ) [public]

Returns True if the view is visible and the mouse coordinate (defined in `event.mouse.where') is within this view.

The coordinate is defined in the global coordinate system.

See Also:
TView::makeGlobal, TView::makeLocal

void locate( TRect& bounds ) [public]

Changes view bounds according to the `bounds' parameter.

This method calls sizeLimits() to be sure that parameter `bounds' is acceptable. Then calls changeBounds() to change view bounds and last the view is redrawn in its new position.

See Also:
TView::changeBounds, TView::sizeLimits

void dragView( TEvent& event, uchar mode, TRect& limits, TPoint minSize, TPoint maxSize ) [public virtual]

YYY

void calcBounds( TRect& bounds, TPoint delta ) [public virtual]

YYY

void changeBounds( const TRect& bounds ) [public virtual]

YYY

void growTo( short x, short y ) [public]

YYY

void moveTo( short x, short y ) [public]

YYY

void setBounds( const TRect& bounds ) [public]

YYY

ushort getHelpCtx() [public virtual]

YYY

Boolean valid( ushort command ) [public virtual]

YYY

void hide() [public]

Hides the view.

It just calls setState() to clear sfVisible bit in `state' variable.

See Also:
TView::setState

void show() [public]

Shows the view.

It just calls setState() to set sfVisible bit in `state' variable.

See Also:
TView::setState

void draw() [public virtual]

Draws the view on the screen.

Every visible object must redefine it. To perform its task, draw() usually uses a TDrawBuffer object.

See Also:
TDrawBuffer, TView::drawView

void drawView() [public]

Draws the view on the screen.

This method calls exposed() to check if the view is exposed and on success calls the draw() method. If you need to redraw a view, it is best to call this method instead of calling draw() directly.

See Also:
TView::draw, TView::exposed

Boolean exposed() [public]

Checks if the view is exposed.

Returns True on success. The view is exposed if:

- it has the sfExposed bit set in `state' variable

- it has the sfVisible bit set in `state' variable

- its coordinates make it fully or partially visible on the screen.

Boolean focus() [public]

Tries to grab the focus.

The view can grab the focus if:

- the view is not selected (bit sfSelected cleared in `state')

- the view is not modal (bit sfModal cleared in `state')

- the owner exists and it is focused.

If all the above conditions are True, the exposed() calls select() to get the focus.

See Also:
TView::select

void hideCursor() [public]

YYY

void drawHide( TView *lastView ) [public]

YYY

void drawShow( TView *lastView ) [public]

YYY

void drawUnderRect( TRect& r, TView *lastView ) [public]

YYY

void drawUnderView( Boolean doShadow, TView *lastView ) [public]

YYY

ushort dataSize() [public virtual]

YYY

void getData( void *rec ) [public virtual]

YYY

void setData( void *rec ) [public virtual]

YYY

void awaken() [public virtual]

YYY

void blockCursor() [public]

YYY

void normalCursor() [public]

YYY

void resetCursor() [public virtual]

YYY

void setCursor( int x, int y ) [public]

YYY

void showCursor() [public]

YYY

void drawCursor() [public]

YYY

void clearEvent( TEvent& event ) [public]

YYY

Boolean eventAvail() [public]

YYY

void getEvent( TEvent& event ) [public virtual]

YYY

void handleEvent( TEvent& event ) [public virtual]

The standard event handler of the view.

void putEvent( TEvent& event ) [public virtual]

YYY

Boolean commandEnabled( ushort command ) [public static]

YYY

void disableCommands( TCommandSet& commands ) [public static]

YYY

void enableCommands( TCommandSet& commands ) [public static]

YYY

void disableCommand( ushort command ) [public static]

YYY

void enableCommand( ushort command ) [public static]

YYY

void getCommands( TCommandSet& commands ) [public static]

YYY

void setCommands( TCommandSet& commands ) [public static]

YYY

void setCmdState( TCommandSet& commands, Boolean enable) [public static]

YYY

void endModal( ushort command ) [public virtual]

YYY

ushort execute() [public virtual]

YYY

ushort getColor( ushort color ) [public]

YYY

TPalette& getPalette() const [public virtual]

YYY

uchar mapColor( uchar ) [public]

YYY

Boolean getState( ushort aState ) [public]

YYY

void select() [public]

YYY

void setState( ushort aState, Boolean enable ) [public virtual]

YYY

void keyEvent( TEvent& event ) [public]

YYY

Boolean mouseEvent( TEvent& event, ushort mask ) [public]

YYY

TPoint makeGlobal( TPoint source ) [public]

YYY

TPoint makeLocal( TPoint source ) [public]

YYY

TView* nextView() [public]

YYY

TView* prevView() [public]

YYY

TView* prev() [public]

YYY

TView *next[public]

YYY

void makeFirst() [public]

YYY

void putInFrontOf( TView *Target ) [public]

YYY

TView* TopView() [public]

YYY

void writeBuf( short x, short y, short w, short h, const void* b ) [public]

YYY

void writeBuf( short x, short y, short w, short h, const TDrawBuffer& b ) [public]

YYY

void writeChar( short x, short y, char c, uchar color, short count ) [public]

YYY

void writeLine( short x, short y, short w, short h, const TDrawBuffer& b ) [public]

YYY

void writeLine( short x, short y, short w, short h, const void *b ) [public]

YYY

void writeStr( short x, short y, const char *str, uchar color ) [public]

YYY

TPoint size[public]

YYY

ushort options[public]

YYY

ushort eventMask[public]

YYY

ushort state[public]

YYY

TPoint origin[public]

YYY

TPoint cursor[public]

YYY

uchar growMode[public]

YYY

uchar dragMode[public]

YYY

ushort helpCtx[public]

YYY

static Boolean commandSetChanged[public]

YYY

static TCommandSet curCommandSet[public]

YYY

TGroup *owner[public]

YYY

static Boolean showMarkers[public]

YYY

static uchar errorAttr[public]

YYY

void shutDown() [public virtual]

YYY

TStreamable* build() [public static]

YYY

TView( StreamableInit ) [protected]

Constructor.

Used to recover the view from a stream.

void write( opstream& os ) [protected virtual]

YYY

void* read( ipstream& is ) [protected virtual]

YYY


Documentation generated by sergio@athena.milk.it on Wed Feb 10 22:11:47 CET 1999
Kdoc