UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZtRubberRay.H
1 /* ZtRubberRay.H */
2 /* $Id: ZtRubberRay.H,v 3.3 2004/02/17 13:53:37 vlad Exp $ */
3 #ifndef __ZtRubberRay_H
4 #define __ZtRubberRay_H
5 
6 #include <zm/ZtObject.H>
7 
8 
15 class ZtRubberRay : public ZtObject
16 {
17 public:
18 
20  ZtRubberRay (ZtMain* pManager,
21  ZGroupId pxid, ZGroupId pyid,
22  ZGroupId nxid, ZGroupId nyid);
23 
28  virtual void ray (float direction[2], int button_id, Logic pressed);
29 
30  /* Event processing status:
31  ziProcessed - if event processing has been finished (ungrab input);
32  ziGrabInput - if event processing must be continued (grab input);
33  ziSkipped - if this event is not processed. */
34  virtual ZInputStatus input (const XEvent* xev);
35 
36  virtual void redraw ()
37  {};
38 
39 
41  virtual void set_base (const float base[2]);
42 
44  virtual void get_base (float base[2]) const;
45 
47  virtual const char* class_id () const;
48 
49 private:
50 
51  ZPoint current;
52  float nc_base[2];
54 protected:
55 
56  Logic drawn;
59  void draw_rubber_ray (const ZPoint& point);
60 
62  void prolongate_ray (const float nc_base[2],
63  const float nc_point[2],
64  float nc_prolong[2]);
65 };
66 
67 
68 #endif /* ZtRubberRay.H */
virtual void set_base(const float base[2])
void prolongate_ray(const float nc_base[2], const float nc_point[2], float nc_prolong[2])
virtual const char * class_id() const
virtual void get_base(float base[2]) const
Definition: ZtMain.H:32
virtual ZInputStatus input(const XEvent *xev)
Definition: geometry.H:16
Logic drawn
Definition: ZtRubberRay.H:56
Definition: ZtRubberRay.H:15
Definition: ZBase.H:30
virtual void redraw()
Definition: ZtRubberRay.H:36
Definition: ZtObject.H:57
ZtRubberRay(ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid)
void draw_rubber_ray(const ZPoint &point)
virtual void ray(float direction[2], int button_id, Logic pressed)