UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ZtObject Class Reference
Inheritance diagram for ZtObject:
ZDrawable ZRect ZGEnv ZPoint ZSize ZConnect Zt3DPoints ZtBBox ZtColoredMatrix ZtCurve ZtGrid ZtHighlight ZtLabel ZtLines ZtPointMark ZtPoints ZtRubberRay ZtRubberRect ZtScale ZtScaledPalette ZtScrollBar ZtSeismicTrace ZtSeismicView ZtTablet

Public Member Functions

 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid)
 
 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZDimension dim, ZGroupId nid)
 
 ZtObject (ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid)
 
 ZtObject (const ZtObject &zobj)
 
ZtMainget_manager () const
 
virtual void prepare_xywh ()
 
ZNCoordSlavenx () const
 
ZNCoordSlaveny () const
 
Logic is_vertical () const
 
Logic is_horizontal () const
 
float x_p2n (int pcoord) const
 
float y_p2n (int pcoord) const
 
int x_n2p (float ncoord) const
 
int y_n2p (float ncoord) const
 
Logic clip_line_by_rect (float sx[2], float sy[2]) const
 
Logic clip_line_by_rect (int sx[2], int sy[2]) const
 
Logic clip_line_by_rect (float sx[2], float sy[2], float nx[2], float ny[2]) const
 
Logic clip_line_by_rect (float sx[2], float sy[2], int px[2], int py[2]) const
 
Logic clip_rect_by_rect (float rcx[2], float rcy[2]) const
 
Logic clip_rect_by_rect (float rx[2], float ry[2], float cx[2], float cy[2]) const
 
void seldom_redraw (Logic flag)
 
Logic is_seldom_redraw () const
 
void changes ()
 
void done ()
 
Logic is_changed () const
 
virtual void extent_rect (ZRect &res)
 
virtual void expose ()
 
virtual void redraw ()
 
virtual void can_hear_events (Logic flag)
 
Logic is_deaf () const
 
virtual ZInputStatus input (const XEvent *xev)
 
virtual void show ()
 
virtual void hide ()
 
Logic is_hidden () const
 
virtual Logic belong (int px, int py) const
 
void raise_exch ()
 
void raise_shift ()
 
virtual const char * class_id () const
 
void wePutMsg (int elevel, const char *s)
 
void weFormatMsg (int elevel, const char *format,...)
 
void put_msg (int elevel, const char *format, va_list val)
 
void format_msg (int elevel, const char *format,...)
 
void set_info_lines (InfoLine *il)
 
InfoLineget_info_lines () const
 
- Public Member Functions inherited from ZDrawable
 ZDrawable (const ZConnect &zconnect, Drawable drawable)
 
 ZDrawable (const ZDrawable &zdrawable)
 
virtual ZRect rect () const
 
void draw_text (int x, int y, int attachment, const char *szText) const
 
void draw_text (const ZRect &box, int alignment, const char *szText) const
 
void write_tiff (const char *path, ZmImageRemarks *remarks=NULL)
 
void write_png (const char *path, ZmImageRemarks *remarks=NULL)
 
- Public Member Functions inherited from ZGEnv
 ZGEnv (const ZConnect &zconnect)
 
 ZGEnv (const ZGEnv &zgenv)
 
void set_foreground (const char *szColorName)
 
void set_foreground (ColorPixel cp)
 
ColorPixel get_foreground () const
 
const char * get_foreground_name () const
 
void set_background (const char *szColorName)
 
void set_background (ColorPixel cp)
 
ColorPixel get_background () const
 
const char * get_background_name () const
 
void swap_ground ()
 
void assign (const ZGEnv &zgenv)
 
void set_line_width (int new_width)
 
int get_line_width () const
 
void set_line_style (int new_style, int dash=3, int hole=3)
 
int get_line_style () const
 
void set_font (const char *szFontName)
 
void set_font_as (const ZGEnv &zgenv)
 
Font get_font () const
 
const char * get_font_name () const
 
int text_width (const char *szText) const
 
int text_width (int n) const
 
int text_height () const
 
int text_ascent () const
 
int text_descent () const
 
ZRect text_rect (int x, int y, int attachment, const char *szText) const
 
virtual void changed_state (int mask_of_changes)
 
ZGEnvoperator= (const ZGEnv &zgenv)
 
- Public Member Functions inherited from ZConnect
 ZConnect (Display *display)
 
 ZConnect (const ZConnect &zconnect)
 
void flush ()
 
void x_error (int code) const
 
ZRect rect (Drawable drawable) const
 
int depth (Drawable drawable) const
 
Window root_wid () const
 
ColorPixel white () const
 
ColorPixel black () const
 
ColorPixel color (const char *szColorName) const
 
- Public Member Functions inherited from ZRect
 ZRect (const ZPoint &zpoint1, const ZPoint &zpoint2)
 
 ZRect (const ZPoint &zpoint, const ZSize &zsize, ZCorner zcorner=zcLeftTop)
 
 ZRect (const ZRect &zrect)
 
virtual void move (const ZPoint &zpoint, ZCorner zcorner=zcLeftTop)
 
virtual Logic inside (const ZPoint &zpoint) const
 
virtual operator XRectangle () const
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZRect &zrect) const
 
bool operator!= (const ZRect &zrect) const
 
- Public Member Functions inherited from ZPoint
 ZPoint (int x_coord, int y_coord)
 
 ZPoint (const ZPoint &zpoint)
 
 operator XPoint () const
 
void add_offset (const ZSize &zsize)
 
void sub_offset (const ZSize &zsize)
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZPoint &zpoint) const
 
bool operator!= (const ZPoint &zpoint) const
 
- Public Member Functions inherited from ZSize
 ZSize (int width, int height)
 
 ZSize (const ZSize &zsize)
 
void difference (const ZPoint &zpoint1, const ZPoint &zpoint2)
 
void print (const char *szEnd="\n") const
 
bool operator== (const ZSize &zsize) const
 
bool operator!= (const ZSize &zsize) const
 

Public Attributes

ZPCoordSlave px
 
ZPCoordSlave py
 
float belong_eps
 
- Public Attributes inherited from ZDrawable
Drawable did
 
- Public Attributes inherited from ZGEnv
GC gc
 
XFontStruct * font
 
- Public Attributes inherited from ZConnect
Display * dpy
 
ScreenNo scr_no
 
- Public Attributes inherited from ZPoint
int x
 
int y
 
- Public Attributes inherited from ZSize
int w
 
int h
 

Protected Attributes

InfoLinepInfoLine
 
ZNCoordSlavepnx
 
ZNCoordSlavepny
 
ZtMainmanager
 

Additional Inherited Members

- Protected Member Functions inherited from ZGEnv
void draw_text (Drawable id, int x, int y, int attachment, const char *szText) const
 
void draw_text (Drawable id, const ZRect &box, int alignment, const char *szText) const
 

Constructor & Destructor Documentation

ZtObject::ZtObject ( ZtMain pManager,
ZGroupId  pxid,
ZGroupId  pyid 
)

Only pixel sizes

ZtObject::ZtObject ( ZtMain pManager,
ZGroupId  pxid,
ZGroupId  pyid,
ZDimension  dim,
ZGroupId  nid 
)

One dimension is proportional

ZtObject::ZtObject ( ZtMain pManager,
ZGroupId  pxid,
ZGroupId  pyid,
ZGroupId  nxid,
ZGroupId  nyid 
)

Both dimensions are proportional

ZtObject::ZtObject ( const ZtObject zobj)

Exact copy of given object (the same manager and group ids)

Member Function Documentation

virtual Logic ZtObject::belong ( int  px,
int  py 
) const
virtual

Self-location: returns TRUE if point belongs to object and FALSE otherwise. FALSE by default.

Reimplemented in ZtSeismicTrace, ZtPointMark, ZtCurve, ZtLines, and ZtPoints.

virtual void ZtObject::can_hear_events ( Logic  flag)
virtual

Control over event processing: TRUE-may process events

void ZtObject::changes ( )

Make changes

virtual const char* ZtObject::class_id ( ) const
virtual
Logic ZtObject::clip_line_by_rect ( float  sx[2],
float  sy[2] 
) const

Clip natural/pixel line (sx1,sy1)-(sy2,sy2) by bounding rectangle and return pixel/natural coords of produced segment. Returns TRUE if clipped segment is not empty.

Logic ZtObject::clip_rect_by_rect ( float  rcx[2],
float  rcy[2] 
) const

Clip natural rectange by bounding box one and return resulting area. Returns TRUE if clipped rectangle is not empty.

void ZtObject::done ( )

Done changes

virtual void ZtObject::expose ( )
virtual

Exposure procedure: determines need of full redraw

Reimplemented from ZGEnv.

Reimplemented in ZtScrollBar.

virtual void ZtObject::extent_rect ( ZRect res)
virtual

Determine real pixel rectangle where object want to redraw

Reimplemented in ZtSeismicTrace, and ZtSeismicView.

void ZtObject::format_msg ( int  elevel,
const char *  format,
  ... 
)

Put formatted message.

InfoLine* ZtObject::get_info_lines ( ) const

Get pointer to info lines.

ZtMain* ZtObject::get_manager ( ) const

Return pointer to the object's manager

virtual void ZtObject::hide ( )
virtual

Disallows to draw itself (affect expose()).

virtual ZInputStatus ZtObject::input ( const XEvent *  xev)
virtual

Event processing status: -ziProcessed - if event processing has been finished (ungrab input); -ziGrabInput - if event processing must be continued (grab input); -ziSkipped - if this event is not processed.

Reimplemented in ZtColoredMatrix, ZtTablet, ZtRubberRect, ZtRubberRay, and ZtRubberSlRect.

Logic ZtObject::is_changed ( ) const
inline

Returns TRUE if some perameters of object has been changed

Logic ZtObject::is_deaf ( ) const
inline

Get mode of event control: TRUE(can't process), FALSE(hears events)

Logic ZtObject::is_hidden ( ) const
inline

Returns TRUE if object will expose itself or FALSE otherwise.

Logic ZtObject::is_seldom_redraw ( ) const
inline

Get mode of expose: with buffered pixmap (TRUE) or without (FALSE)

Logic ZtObject::is_vertical ( ) const

Determine if this object vertical or horizontal

ZNCoordSlave& ZtObject::nx ( ) const

Get natural slave or excite exception

virtual void ZtObject::prepare_xywh ( )
virtual

Prepare separate pixel coords (x,x+w-1)-(y,y+h-1) from px and py

void ZtObject::put_msg ( int  elevel,
const char *  format,
va_list  val 
)

Put formatted message.

void ZtObject::raise_exch ( )

Put object at the top of drawing list by exchanging with the actual top one.

void ZtObject::raise_shift ( )

Put object at the top of drawing list by pushing the actual top one at lower level.

virtual void ZtObject::redraw ( )
virtual
void ZtObject::seldom_redraw ( Logic  flag)

Set mode of expose: with buffered pixmap (TRUE) or without (FALSE)

void ZtObject::set_info_lines ( InfoLine il)

Set/reset info lines.

virtual void ZtObject::show ( )
virtual

Allows to draw itself (affect expose()).

void ZtObject::weFormatMsg ( int  elevel,
const char *  format,
  ... 
)

wenv compatibility.

void ZtObject::wePutMsg ( int  elevel,
const char *  s 
)

wenv compatibility.

Member Data Documentation

float ZtObject::belong_eps

Precision of belong() operation in pixels

ZtMain* ZtObject::manager
protected

always non-NULL master

InfoLine* ZtObject::pInfoLine
protected

Object which is responsible for displaying local messages for user.

ZNCoordSlave* ZtObject::pnx
protected

natural X-dimension or NULL

ZNCoordSlave* ZtObject::pny
protected

natural Y-dimension or NULL

ZPCoordSlave ZtObject::px

horizontal pixel coordinate management gate

ZPCoordSlave ZtObject::py

vertical pixel coordinate management gate


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