]> git.mxchange.org Git - flightgear.git/blob - src/GUI/prop_picker.hxx
Updated mouse gui tweaks and Jim's nifty new external view controls.
[flightgear.git] / src / GUI / prop_picker.hxx
1 /*
2   prop_picker.hxx
3
4 */
5
6 #include <plib/pu.h>
7
8 #include <stdio.h>
9 #include "gui.h"
10
11 void prop_pickerInit();
12 void prop_pickerView( puObject * );
13 void prop_pickerRefresh();
14 void prop_editInit(char * name, char * value );
15 void prop_editOpen( char * name, char * value );
16
17 class fgPropPicker       ;
18 class fgPropEdit       ;
19
20 class fgPropPicker : public puDialogBox
21 {
22
23   static void handle_select ( puObject *b ) ;
24   static void input_entered ( puObject *b ) ;
25   static void fgPropPickerHandleSlider ( puObject * slider );
26   static void fgPropPickerHandleArrow ( puObject *arrow );
27   static void fgPropPickerHandleOk ( puObject* b );
28
29   char** files ;
30   char** names ;
31   char** values ;
32   char*  dflag ;
33   int num_files   ;
34   int arrow_count ;
35   char startDir [ PUSTRING_MAX * 2 ] ;
36
37 /* puInput   *input         ; */
38
39 protected:
40
41   puFrame   *frame         ;
42   puListBox *list_box      ;
43   puSlider  *slider        ;
44   puOneShot *cancel_button ;
45   puOneShot *ok_button     ;
46
47
48 public:
49   puText    *proppath      ;
50   void find_props () ;
51   fgPropPicker ( int x, int y, int w, int h, int arrows,
52                  const char *dir, const char *title = "Pick a file" ) ;
53
54   ~fgPropPicker () {;}
55
56   static void go_up_one_directory ( char *fname ) ;
57   static void chop_file ( char *fname ) ;
58
59 } ;
60
61 class fgPropEdit : public puDialogBox
62 {
63
64   static void fgPropEditHandleCancel ( puObject *b ) ;
65   static void fgPropEditHandleOK ( puObject* b );
66
67 protected:
68
69   puFrame   *frame         ;
70   puOneShot *cancel_button ;
71   puOneShot *ok_button     ;
72
73 public:
74   puText    *propname     ;
75   puInput   *propinput     ;
76   char propPath [ PUSTRING_MAX * 2 ] ;
77
78   fgPropEdit ( char *name, char *value, char *proppath ) ;
79
80   ~fgPropEdit () {;}
81
82   static void go_up_one_directory ( char *fname ) ;
83   static void chop_file ( char *fname ) ;
84
85 } ;
86