OpendTect-6_4  6.4
uiselsimple.h
Go to the documentation of this file.
1 #ifndef uiselsimple_h
2 #define uiselsimple_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: Dec 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "uidialog.h"
17 #include "uistring.h"
18 
19 class uiGroup;
20 class uiListBox;
21 class uiGenInput;
22 class uiCheckList;
23 class uiListBoxFilter;
24 class BufferStringSet;
25 
30 public:
31 
32  mExpClass(uiTools) Setup : public uiDialog::Setup
33  {
34  public:
35  Setup( const uiString& wintitl,
36  const uiStringSet& its )
37  : uiDialog::Setup(wintitl,mNoDlgTitle,mNoHelpKey)
38  , items_(its)
39  , current_(0) {}
40  Setup( const uiString& wintitl,
41  const BufferStringSet& its )
42  : uiDialog::Setup(wintitl,mNoDlgTitle,mNoHelpKey)
43  , current_(0) { its.fill(items_); }
44 
45  mDefSetupMemb(int,current);
46 
48 
49  };
50 
53 
54  int selection() const { return setup_.current_; }
56 
57  uiListBox* selFld() { return selfld_; }
58  uiListBoxFilter* filtFld() { return filtfld_; }
59  uiObject* bottomFld();
60 
61 protected:
62 
64 
67 
68  void filtChg(CallBacker*);
69  virtual bool acceptOK(CallBacker*);
70 
71 private:
72 
73  void init(const char**,int,const char*);
74 
75 };
76 
77 
82 public:
83 
84  mExpClass(uiTools) Setup : public uiDialog::Setup
85  {
86  public:
87  Setup( const uiString& wintitl,
88  const BufferStringSet& its )
89  : uiDialog::Setup(wintitl,mNoDlgTitle,mNoHelpKey)
90  , items_(its)
91  , inptxt_( uiStrings::sName()) {}
92 
94  mDefSetupMemb(uiString,inptxt);
95 
97 
98  };
99 
100  uiGetObjectName(uiParent*,const Setup&);
102 
103  const char* text() const;
104 
105  uiGenInput* inpFld() { return inpfld_; }
106  uiListBox* selFld() { return listfld_; }
107  uiGroup* bottomFld();
108 
109 protected:
110 
113 
114  void selChg(CallBacker*);
115  virtual bool acceptOK(CallBacker*);
116 
117 };
118 
119 
122 mExpClass(uiTools) uiGetChoice : public uiDialog
124 public:
125 
126  uiGetChoice(uiParent*,const uiString& question=
128  bool allowcancel=true,
129  const HelpKey& helpkey=mNoHelpKey);
131  const BufferStringSet& options,
132  const uiString& question=
134  bool allowcancel=true,
135  const HelpKey& helpkey=mNoHelpKey);
137  const BufferStringSet& options, bool wc);
138 
139  void addChoice(const uiString& txt,const char* iconnm=0);
140  void setDefaultChoice(int);
141  int choice() const { return choice_; }
143 
144  uiCheckList* checkList();
145  uiGroup* bottomFld();
146 
147 protected:
148 
150  int choice_;
151  const bool allowcancel_;
152 
153  virtual bool acceptOK(CallBacker*);
154  virtual bool rejectOK(CallBacker*);
155 
156 };
157 
158 
159 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
description of properties of dialog.
Definition: uidialog.h:51
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mNoHelpKey
Definition: uidialog.h:39
uiCheckList * inpfld_
Definition: uiselsimple.h:149
~uiGetObjectName()
Definition: uiselsimple.h:101
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const BufferStringSet & items_
Definition: uiselsimple.h:96
~uiSelectFromList()
Definition: uiselsimple.h:52
Group of check boxes. Ensures a certain policy is honored.
Definition: uichecklist.h:34
bool init()
A filter field attaching itself to a listbox.
Definition: uilistboxfilter.h:22
Definition: uiselsimple.h:32
Get an action from a series of possibilities from user.
Definition: uiselsimple.h:122
Definition: uistrings.h:24
The base class for most UI elements.
Definition: uiobj.h:38
Get a name from user, whilst displaying names that already exist.
Definition: uiselsimple.h:80
Setup setup_
Definition: uiselsimple.h:63
Definition: uistring.h:89
#define mNoDlgTitle
Stand-alone dialog window with optional 'OK', 'Cancel' and 'Save defaults' button.
Definition: uidialog.h:37
Definition: uiparent.h:26
void fill(uiStringSet &) const
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: helpview.h:49
uiListBox * selFld()
Definition: uiselsimple.h:57
int choice() const
on cancel will be -1
Definition: uiselsimple.h:141
Definition: uidialog.h:42
int choice_
Definition: uiselsimple.h:150
List Box.
Definition: uilistbox.h:75
uiListBox * selfld_
Definition: uiselsimple.h:65
uiListBox * listfld_
Definition: uiselsimple.h:112
uiListBoxFilter * filtFld()
Definition: uiselsimple.h:58
const bool allowcancel_
Definition: uiselsimple.h:151
uiGenInput * inpFld()
Definition: uiselsimple.h:105
int selection() const
-1 = no selection made (cancelled or 0 list items)
Definition: uiselsimple.h:54
Setup(const uiString &wintitl, const BufferStringSet &its)
Definition: uiselsimple.h:87
General Input Element.
Definition: uigeninput.h:58
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Setup(const uiString &wintitl, const BufferStringSet &its)
Definition: uiselsimple.h:40
Select entry from list.
Definition: uiselsimple.h:28
Definition: uiselsimple.h:84
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
uiListBoxFilter * filtfld_
Definition: uiselsimple.h:66
uiListBox * selFld()
Definition: uiselsimple.h:106
Definition: uistring.h:218
uiStringSet items_
Definition: uiselsimple.h:47
Setup(const uiString &wintitl, const uiStringSet &its)
Definition: uiselsimple.h:35
static uiString sEmptyString()
Definition: uistrings.h:286
uiGenInput * inpfld_
Definition: uiselsimple.h:111

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