UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZtLabel.H
1 /* ZtLabel.H */
2 /* $Id: ZtLabel.H,v 1.4 2005/07/18 07:16:56 nikita Exp $ */
3 #ifndef __ZtLabel_H
4 #define __ZtLabel_H
5 
6 #include <mix/wenv.h>
7 #include <zm/ZtObject.H>
8 
9 
10 /***********************************************************************
11  * Print label in pointed place.
12  ***********************************************************************/
13 class ZtLabel: public ZtObject
14 {
15 private:
16 
17  char szTextBuf[WE_MSG_LEN]; // prefix + message buffer
18  char *szMessage; // message itself
19  int alignment; // text alignment
20 
21 public:
22 
23  ZtLabel (ZtMain* pManager, ZGroupId pxid, ZGroupId pyid);
24 
25  /* Non-trivial expose */
26  virtual void redraw ();
27 
28  /* Set/get alignment */
29  void set_alignment (int a) {
30  alignment = a;
31  changes();
32  }
33  int get_alignment () const {
34  return alignment;
35  }
36 
37  /* Set leading string */
38  void prefix (const char* prefix);
39 
40  /* Draw new message */
41  void format (const char* fmt, ...);
42 
43  /* Method is called for FixedSize adjustment when font was changed */
44  virtual void changed_state (int mask_of_changes);
45 
47  virtual const char* class_id () const;
48 
50  const char* text(){return szMessage;};
51 };
52 
53 
54 #endif /* ZtLabel.H */
Definition: ZtMain.H:32
void changes()
virtual const char * class_id() const
const char * text()
Definition: ZtLabel.H:50
Definition: ZtObject.H:57
Definition: ZtLabel.H:13
virtual void redraw()