TView Class Reference
[tvision Index] [tvision Hierarchy]
[Headers]
The base of all visible objects More...
#include <views.h>
Inherits: TObject, TStreamable
Public Members
- enum phaseType { phFocused, phPreProcess, phPostProcess }
- enum selectMode { normalSelect, enterSelect, leaveSelect }
- TView ( const TRect& bounds )
- ~TView ()
- virtual void sizeLimits ( TPoint& min, TPoint& max )
- TRect getBounds ()
- TRect getExtent ()
- TRect getClipRect ()
- Boolean mouseInView ( TPoint mouse )
- Boolean containsMouse ( TEvent& event )
- void locate ( TRect& bounds )
- virtual void dragView ( TEvent& event, uchar mode, TRect& limits, TPoint minSize, TPoint maxSize )
- virtual void calcBounds ( TRect& bounds, TPoint delta )
- virtual void changeBounds ( const TRect& bounds )
- void growTo ( short x, short y )
- void moveTo ( short x, short y )
- void setBounds ( const TRect& bounds )
- virtual ushort getHelpCtx ()
- virtual Boolean valid ( ushort command )
- void hide ()
- void show ()
- virtual void draw ()
- void drawView ()
- Boolean exposed ()
- Boolean focus ()
- void hideCursor ()
- void drawHide ( TView *lastView )
- void drawShow ( TView *lastView )
- void drawUnderRect ( TRect& r, TView *lastView )
- void drawUnderView ( Boolean doShadow, TView *lastView )
- virtual ushort dataSize ()
- virtual void getData ( void *rec )
- virtual void setData ( void *rec )
- virtual void awaken ()
- void blockCursor ()
- void normalCursor ()
- virtual void resetCursor ()
- void setCursor ( int x, int y )
- void showCursor ()
- void drawCursor ()
- void clearEvent ( TEvent& event )
- Boolean eventAvail ()
- virtual void getEvent ( TEvent& event )
- virtual void handleEvent ( TEvent& event )
- virtual void putEvent ( TEvent& event )
- static Boolean commandEnabled ( ushort command )
- static void disableCommands ( TCommandSet& commands )
- static void enableCommands ( TCommandSet& commands )
- static void disableCommand ( ushort command )
- static void enableCommand ( ushort command )
- static void getCommands ( TCommandSet& commands )
- static void setCommands ( TCommandSet& commands )
- static void setCmdState ( TCommandSet& commands, Boolean enable)
- virtual void endModal ( ushort command )
- virtual ushort execute ()
- ushort getColor ( ushort color )
- virtual TPalette& getPalette () const
- uchar mapColor ( uchar )
- Boolean getState ( ushort aState )
- void select ()
- virtual void setState ( ushort aState, Boolean enable )
- void keyEvent ( TEvent& event )
- Boolean mouseEvent ( TEvent& event, ushort mask )
- TPoint makeGlobal ( TPoint source )
- TPoint makeLocal ( TPoint source )
- TView* nextView ()
- TView* prevView ()
- TView* prev ()
- TView *next
- void makeFirst ()
- void putInFrontOf ( TView *Target )
- TView* TopView ()
- void writeBuf ( short x, short y, short w, short h, const void* b )
- void writeBuf ( short x, short y, short w, short h, const TDrawBuffer& b )
- void writeChar ( short x, short y, char c, uchar color, short count )
- void writeLine ( short x, short y, short w, short h, const TDrawBuffer& b )
- void writeLine ( short x, short y, short w, short h, const void *b )
- void writeStr ( short x, short y, const char *str, uchar color )
- TPoint size
- ushort options
- ushort eventMask
- ushort state
- TPoint origin
- TPoint cursor
- uchar growMode
- uchar dragMode
- ushort helpCtx
- static Boolean commandSetChanged
- static TCommandSet curCommandSet
- TGroup *owner
- static Boolean showMarkers
- static uchar errorAttr
- virtual void shutDown ()
- static TStreamable* build ()
Protected Members
- TView ( StreamableInit )
- virtual void write ( opstream& os )
- virtual void* read ( ipstream& is )
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.
Destructor.
Gets the minimum and maximum size limits of the view.
Returns the bounding rectangle of the view.
`a' is set to `origin' and `b' is set to `origin' + `size'.
Returns the size of the view.
`a' is set to 0,0 and `b' is set to `size'.
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
Returns True if the coordinate `mouse' is inside this view.
`mouse' is defined in the global coordinate system.
- See Also:
- TView::makeGlobal, TView::makeLocal
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
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
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
YYY
void drawHide( TView *lastView ) [public]
YYY
void drawShow( TView *lastView ) [public]
YYY
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
YYY
YYY
void resetCursor() [public virtual]
YYY
void setCursor( int x, int y ) [public]
YYY
YYY
YYY
YYY
YYY
void getEvent( TEvent& event ) [public virtual]
YYY
The standard event handler of the view.
void putEvent( TEvent& event ) [public virtual]
YYY
Boolean commandEnabled( ushort command ) [public static]
YYY
YYY
YYY
void disableCommand( ushort command ) [public static]
YYY
void enableCommand( ushort command ) [public static]
YYY
YYY
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
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
YYY
Boolean mouseEvent( TEvent& event, ushort mask ) [public]
YYY
YYY
YYY
YYY
YYY
YYY
YYY
YYY
YYY
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
YYY
ushort options[public]
YYY
YYY
ushort state[public]
YYY
YYY
YYY
YYY
YYY
ushort helpCtx[public]
YYY
YYY
YYY
YYY
static Boolean showMarkers[public]
YYY
static uchar errorAttr[public]
YYY
void shutDown() [public virtual]
YYY
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
|