Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

UView Class Reference

Box View. More...

#include <uview.hpp>

Inheritance diagram for UView:

URegion UPaneView UScrollbarView UTableView List of all members.

Public Member Functions

 UView (class UBoxLink *, UView *parview, UWinGraph *)
UViewgetParentView () const
 returns the parent view.

UDispgetDisp () const
UAppligetAppli () const
 return the corresponding Display and Application contexts.

UBox * getBox () const
 returns the UBox that controls this view.

UBox * getBoxParent () const
 returns the parent of the UBox that controls this view

bool isRealized () const
 returns true if this view has been realized

u_dim getWidth () const
u_dim getHeight () const
void getSize (u_dim &w, u_dim &h) const
 returns the size of this View.

void setWidth (u_dim width)
void setHeight (u_dim height)
void resize (u_dim width, u_dim height)
 changes the size of this view (when applicable)

u_pos getX () const
u_pos getY () const
bool where (u_pos &x, u_pos &y) const
 returns the location of this view relatively to its parent

u_pos getXwin () const
u_pos getYwin () const
bool whereInWin (u_pos &x, u_pos &y) const
 returns the location of this view relatively to its enclosing window

u_pos getXscreen () const
u_pos getYscreen () const
bool whereOnScreen (u_pos &x, u_pos &y) const
 returns the location of this view in screen coordinate.

u_pos getXappli () const
u_pos getYappli () const
bool whereOnAppli (u_pos &x, u_pos &y) const
 returns the location of this view in the UAppli coordinate (= relatively to the main frame).

u_pos XToXwin (u_pos x_in_view) const
u_pos YToYwin (u_pos y_in_view) const
 converts a position in view coordinates to window coordinates.

u_pos XwinToX (u_pos x_in_win) const
u_pos YwinToY (u_pos y_in_win) const
 convert a position in window coordinates to view coordinates.

virtual UViewStylegetViewStyle ()
 [impl] returns the current view style.

UNatWin * getNatWin () const
UWingetHardwin () const
UViewgetHardwinView () const
 [impl] return native counterparts.

UWinGraphgetWinGraph () const
UWinGraphwg () const
 [impl] return Window Graphics


Static Public Member Functions

UViewmakeView (class UBoxLink *, UView *parview, UWinGraph *)
 makeView() is a "static creator" used by UViewStyle to make a new view.

bool convertPos (UView *to_view, u_pos &to_x, u_pos &to_y, UView *from_view, u_pos from_x, u_pos from_y)
 converts position in 'from_view' to position in 'to_view'.


Static Public Attributes

UViewStyle style

Detailed Description

Box View.

UBox objects (and subclasses except UWin) can have several views. these views can be retrieved by methods UBox::getView(), UBox::getViews(), etc.

Note: UWin objects (and subclasses) have only onse (shared) view that is called the "window view".


Member Function Documentation

UBox * UView::getBoxParent  )  const
 

returns the parent of the UBox that controls this view

Note: this function is meaningless if this view is a WINDOW view (= if the box that controls this view is a UWin)

bool UView::isRealized  )  const
 

returns true if this view has been realized

a view is realized when physical (= X window) resources have been created

void UView::resize u_dim  width,
u_dim  height
 

changes the size of this view (when applicable)

Note: these functions do no redisplay the view (the new size will be taken into account when the view is updated)

class UWinGraph& UView::wg  )  const
 

[impl] return Window Graphics

CAUTION:

  • clients should never use this data for drawing (nor try to delete it)! => use an UGraph object instead.

bool UView::where u_pos &  x,
u_pos &  y
const
 

returns the location of this view relatively to its parent

Note: returns 0 if this view is a WINDOW View.

bool UView::whereInWin u_pos &  x,
u_pos &  y
const
 

returns the location of this view relatively to its enclosing window

Notes:

  • returns 0 if this view is a WINDOW View.
  • as layout is performed automatically, there is no method for changing the x,y position directly (use the 'UPos' object for this purpose)


The documentation for this class was generated from the following files:
Generated on Fri Aug 13 12:12:15 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.7