Last change
on this file since 6d21bd was 6d21bd, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
Added Basis for creating globally accessible and compatible UIElements
- Added Factories for UIElements that can be chosen at programm startup
- Added Dialogs that can be used to query values
|
-
Property mode
set to
100644
|
File size:
777 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * Dialog.hpp
|
---|
3 | *
|
---|
4 | * Created on: Jan 5, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef DIALOG_HPP_
|
---|
9 | #define DIALOG_HPP_
|
---|
10 |
|
---|
11 | #include<string>
|
---|
12 | #include<list>
|
---|
13 |
|
---|
14 | class Dialog
|
---|
15 | {
|
---|
16 | public:
|
---|
17 | Dialog();
|
---|
18 | virtual ~Dialog();
|
---|
19 |
|
---|
20 | void queryInt(const char *, int *);
|
---|
21 | void queryString(const char*, std::string *);
|
---|
22 |
|
---|
23 | virtual void display();
|
---|
24 |
|
---|
25 | protected:
|
---|
26 | virtual void handleInt(std::string,int *)=0;
|
---|
27 | virtual void handleString(std::string,std::string *)=0;
|
---|
28 |
|
---|
29 |
|
---|
30 | private:
|
---|
31 | // methodology for handling queries
|
---|
32 | // all queries are stored and then performed at appropriate times
|
---|
33 |
|
---|
34 | //these queries can be handled by this dialog
|
---|
35 | enum QueryType {Int,String};
|
---|
36 | struct Query {
|
---|
37 | std::string title;
|
---|
38 | QueryType type;
|
---|
39 | void *target;
|
---|
40 | };
|
---|
41 |
|
---|
42 | std::list<Query> queries;
|
---|
43 |
|
---|
44 | };
|
---|
45 |
|
---|
46 | #endif /* DIALOG_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.