FDOSTUI
FreeDOS Text User Interface
filedlg.hpp
Go to the documentation of this file.
1 /*
2  FILEDLG.HPP
3 
4  License CC0 PUBLIC DOMAIN
5 
6  To the extent possible under law, Mark J. Olesen has waived all copyright
7  and related or neighboring rights to FDOSTUI Library. This work is published
8  from: United States.
9 */
10 #ifndef __filedlg_hpp__
11 
12 #include "window.hpp"
13 #include "label.hpp"
14 #include "entry.hpp"
15 #include "checkbtn.hpp"
16 #include "listbox.hpp"
17 #include "combobox.hpp"
18 
19 class filedlg : public window
20 {
21 
22 public:
23 
24  filedlg(
25  int const i_pos_x,
26  int const i_pos_y,
27  unsigned int const i_len_x,
28  unsigned int const i_len_y);
29 
30  virtual
31  ~filedlg();
32 
33  unsigned char *
34  get_filename() const;
35 
36  void
38  unsigned char const* i_filename);
39 
40 protected:
41 
46 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
48 #endif
50 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
52 #endif
60 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
62 #endif
63 
64  void
66 
67  void
69 
70 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
71  void
73 #endif
74 
75  void
77 
78 private:
79 
80  filedlg();
81 
82  filedlg(
83  const filedlg&);
84 
85  filedlg&
86  operator=(filedlg const&);
87 
88 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
89  static void
91  listbox const* i_listbox,
92  void* io_user_data);
93 #endif
94 
95  static void
97  entry const* i_entry,
98  void* io_user_data);
99 
100  static void
102  listbox const* i_listbox,
103  void* io_user_data);
104 
105  static void
107  button const* i_button,
108  void* io_user_data);
109 
110  static void
112  button const* i_button,
113  void* io_user_data);
114 
115 public:
116 
117 #if defined(__DOS__) || defined(__DJGPP__) || defined(__NT__)
118  void
120 #endif
121 
122  void
124 
125  void
127 
128  void
130 
131  void
132  refresh();
133 
134 };
135 
136 #define __filedlg_hpp__
137 #endif
contains entry class
contains window class
static void listbox_drive_cb(listbox const *i_listbox, void *io_user_data)
listbox drives callback
Definition: filedlg.cpp:30
unsigned char * get_filename() const
gets the filename the user choose
Definition: filedlg.cpp:527
void refresh()
refreshes/reloads dialog box
Definition: filedlg.cpp:715
virtual ~filedlg()
destructor
Definition: filedlg.cpp:201
label * m_label_filter
Definition: filedlg.hpp:44
entry * m_entry_filter
Definition: filedlg.hpp:45
contains label class
static void listbox_file_cb(listbox const *i_listbox, void *io_user_data)
listbox file callback
Definition: filedlg.cpp:57
void set_filename(unsigned char const *i_filename)
sets the default file name
Definition: filedlg.cpp:579
check button widget
Definition: checkbtn.hpp:15
contains combobox class
button * m_button_cancel
Definition: filedlg.hpp:54
void configure_listbox_file()
configure file listbox. Loads files from the current directory.
Definition: filedlg.cpp:207
label * m_label_message
Definition: filedlg.hpp:57
label * m_label_file
Definition: filedlg.hpp:42
static void combobox_directory_cb(entry const *i_entry, void *io_user_data)
combobox directories callback
Definition: filedlg.cpp:43
button * m_button_refresh
Definition: filedlg.hpp:53
void configure_default()
startup configuration. Loads the dialog up with intial values.
Definition: filedlg.cpp:357
checkbutton * m_checkbutton_hidden
Definition: filedlg.hpp:49
button * m_button_ok
Definition: filedlg.hpp:55
Allows display of text.
Definition: label.hpp:21
Allows a user to choose a file.
Definition: filedlg.hpp:19
void file_changed_internal()
event handler when file changed
Definition: filedlg.cpp:491
void configure_listbox_directories()
configure directories listbox. Loads directories from current directory.
Definition: filedlg.cpp:266
static void checkbutton_attribute_cb(button const *i_button, void *io_user_data)
attributes call back (system, readonly, hidden)
Definition: filedlg.cpp:70
Allows a user to enter text.
Definition: entry.hpp:14
listbox * m_listbox_file
Definition: filedlg.hpp:58
void attribute_changed_internal()
event handler when attribute (hidden, system, readonly) changed
Definition: filedlg.cpp:520
void configure_listbox_drives()
configure drives listbox. Loads drives from the hardware module.
Definition: filedlg.cpp:322
void directory_changed_internal()
event handler when directory changed
Definition: filedlg.cpp:438
top level container widget that can be moved and resized by the user
Definition: window.hpp:19
listbox * m_listbox_drives
Definition: filedlg.hpp:61
checkbutton * m_checkbutton_system
Definition: filedlg.hpp:51
void drive_changed_internal()
event handler when drive changes
Definition: filedlg.cpp:378
contains listbox class
combobox * m_combobox_directories
Definition: filedlg.hpp:59
contains checkbutton class
Allows the user to choose a value from a drop down list. Optionally, the user can also enter a value ...
Definition: combobox.hpp:15
checkbutton * m_checkbutton_readonly
Definition: filedlg.hpp:47
Allows a user to click on a button.
Definition: button.hpp:21
label * m_label_path
Definition: filedlg.hpp:56
Allows the user to choose a value from a list.
Definition: listbox.hpp:20
entry * m_entry_file
Definition: filedlg.hpp:43
static void button_refresh_cb(button const *i_button, void *io_user_data)
refresh button callback
Definition: filedlg.cpp:83