OpendTect-6_4  6.4
uilabel.h
Go to the documentation of this file.
1 #ifndef uilabel_h
2 #define uilabel_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 7/9/2000
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uiobj.h"
17 #include "draw.h"
18 #include "uistring.h"
19 
20 class uiGroup;
21 class uiLabelBody;
22 class uiPixmap;
23 
24 mExpClass(uiBase) uiLabel : public uiObject
25 {
26 public:
27 
28  uiLabel(uiParent*,const uiString&);
29  uiLabel(uiParent*,const uiString&,uiObject*);
30  uiLabel(uiParent*,const uiString&,uiGroup*);
31 
39  virtual void setText(const uiString&);
40  const uiString& text() const;
41  void setTextSelectable(bool yn=true);
42  void setPixmap(const uiPixmap&);
43  void setIcon(const char* iconnm);
44 
49  void setAlignment(Alignment::HPos);
50  Alignment::HPos alignment() const;
51 
52  void makeRequired(bool yn=true);
53 
54 private:
55  void translateText();
56 
57  void init(const uiString& txt,uiObject* buddy);
58  void updateWidth();
59 
60  uiLabelBody* body_;
61  uiLabelBody& mkbody(uiParent*,const uiString&);
62 
64 
66 };
67 
68 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
bool init()
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
uiLabelBody * body_
Definition: uilabel.h:60
HPos
Definition: draw.h:26
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
uiString text_
Definition: uilabel.h:63
bool isrequired_
Definition: uilabel.h:65
Definition: uilabel.h:24

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019