10 #include <simgear/misc/props.hxx>
12 void prop_pickerInit();
13 void prop_pickerView( puObject * );
14 void prop_pickerRefresh();
15 void prop_editInit( const char * name, const char * value );
16 void prop_editOpen( const char * name, const char * value );
23 public SGPropertyChangeListener
26 static void handle_select ( puObject *b ) ;
27 static void input_entered ( puObject *b ) ;
28 static void fgPropPickerHandleSlider ( puObject * slider );
29 static void fgPropPickerHandleArrow ( puObject *arrow );
30 static void fgPropPickerHandleOk ( puObject* b );
32 void delete_arrays () ;
34 /** update the text string in the puList using the given node and
35 updating the requested offset. The value of dotFiles is taken
36 into account before the index is applied, i.e this should be
37 an index into 'children' */
38 void updateTextForEntry(int index);
43 char startDir [ PUSTRING_MAX * 2 ] ;
45 SGPropertyNode_ptr* children;
48 /** set if we're display the . and .. entries at the start of the
52 /* puInput *input ; */
59 puOneShot *cancel_button ;
60 puOneShot *ok_button ;
61 puArrowButton *down_arrow ;
62 puArrowButton *up_arrow ;
67 fgPropPicker ( int x, int y, int w, int h, int arrows,
68 const char *dir, const char *title = "Pick a file" ) ;
72 static void go_up_one_directory ( char *fname ) ;
73 static void chop_file ( char *fname ) ;
75 // over-ride the method from SGPropertyNodeListener
76 virtual void valueChanged (SGPropertyNode * node);
79 class fgPropEdit : public puDialogBox
82 static void fgPropEditHandleCancel ( puObject *b ) ;
83 static void fgPropEditHandleOK ( puObject* b );
88 puOneShot *cancel_button ;
89 puOneShot *ok_button ;
94 char propPath [ PUSTRING_MAX * 2 ] ;
96 fgPropEdit ( const char *name, const char *value, char *proppath ) ;
100 static void go_up_one_directory ( char *fname ) ;
101 static void chop_file ( char *fname ) ;