OpendTect-6_4  6.4
uibuildlistfromlist.h
Go to the documentation of this file.
1 #ifndef uibuildlistfromlist_h
2 #define uibuildlistfromlist_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: June 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "uitoolsmod.h"
17 #include "uigroup.h"
18 #include "bufstringset.h"
19 
20 class uiListBox;
21 class uiToolButton;
22 
52 public:
53 
54  mExpClass(uiTools) Setup
55  {
56  public:
57  Setup(bool itemsmovable,const char* avitmtyp,
58  const char* defitmtyp);
59 
60  mDefSetupMemb(bool,movable);
61  mDefSetupMemb(bool,withio); // default: true
62  mDefSetupMemb(bool,withtitles); // default: false
63  mDefSetupMemb(bool,singleuse); // default: false
64  mDefSetupMemb(BufferString,avitemtype);
65  mDefSetupMemb(BufferString,defitemtype);
66  mDefSetupMemb(BufferString,avtitle); // titles
67  mDefSetupMemb(BufferString,deftitle);
68  mDefSetupMemb(BufferString,addtt); // tooltips
71 
72  };
73 
75  const char* grpnm=0);
76  bool haveUserChange() const { return usrchg_; }
77 
78 protected:
79 
81  bool usrchg_;
82 
90 
91  uiToolButton* lowestStdBut();
92  const char* curAvSel() const;
93  const char* curDefSel() const;
94  void setCurDefSel(const char*);
95 
96  virtual void editReq(bool isadd) = 0;
97  virtual void removeReq() = 0;
98  virtual const char* avFromDef(const char*) const = 0;
99  virtual bool ioReq( bool forsave ) { return false; }
100  virtual void itemSwitch(const char*,const char*) {}
101  virtual void defSelChg();
102 
103  void setAvailable(const BufferStringSet&);
104  void removeItem();
105  void removeAll();
106  void setItemName(const char*);
107  void addItem(const char*);
108  void handleSuccessfullEdit( bool isadd, const char* itmnm )
109  { isadd ? addItem( itmnm ) : setItemName( itmnm ); }
110 
111  void defSelCB( CallBacker* ) { defSelChg(); }
112  void addCB( CallBacker* ) { editReq( true ); }
113  void edCB( CallBacker* ) { editReq( false ); }
114  void rmCB( CallBacker* ) { removeReq(); }
115  void openCB(CallBacker*);
116  void saveCB(CallBacker*);
117  void moveCB(CallBacker*);
118 
119  void rmItm(int,bool);
120 
121 };
122 
123 
124 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
void rmCB(CallBacker *)
Definition: uibuildlistfromlist.h:114
FixedString Setup()
Definition: keystrs.h:116
void defSelCB(CallBacker *)
Definition: uibuildlistfromlist.h:111
Base class for element allowing the building of lists of items from available 'ingredients'.
Definition: uibuildlistfromlist.h:50
uiToolButton * movedownbut_
Definition: uibuildlistfromlist.h:89
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool haveUserChange() const
Definition: uibuildlistfromlist.h:76
bool usrchg_
Definition: uibuildlistfromlist.h:81
void addCB(CallBacker *)
Definition: uibuildlistfromlist.h:112
Definition: uiparent.h:26
uiToolButton * rmbut_
Definition: uibuildlistfromlist.h:86
Set of BufferString objects.
Definition: bufstringset.h:28
uiToolButton * savebut_
Definition: uibuildlistfromlist.h:87
uiToolButton * edbut_
Definition: uibuildlistfromlist.h:85
List Box.
Definition: uilistbox.h:75
Definition: uibuildlistfromlist.h:54
void removeAll()
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
uiListBox * avfld_
Definition: uibuildlistfromlist.h:83
Setup setup_
Definition: uibuildlistfromlist.h:80
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual bool ioReq(bool forsave)
Definition: uibuildlistfromlist.h:99
Definition: uitoolbutton.h:22
uiToolButton * moveupbut_
Definition: uibuildlistfromlist.h:88
void handleSuccessfullEdit(bool isadd, const char *itmnm)
Definition: uibuildlistfromlist.h:108
virtual void itemSwitch(const char *, const char *)
Definition: uibuildlistfromlist.h:100
uiListBox * deffld_
Definition: uibuildlistfromlist.h:84
void edCB(CallBacker *)
Definition: uibuildlistfromlist.h:113

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