11 #include <simgear/props/props.hxx>
13 void prop_pickerInit();
14 void prop_pickerView( puObject * );
15 void prop_pickerRefresh();
16 void prop_editInit( const char * name, const char * value );
17 void prop_editOpen( const char * name, const char * value );
24 public SGPropertyChangeListener
27 static void handle_select ( puObject *b ) ;
28 static void input_entered ( puObject *b ) ;
29 static void fgPropPickerHandleSlider ( puObject * slider );
30 static void fgPropPickerHandleArrow ( puObject *arrow );
31 static void fgPropPickerHandleOk ( puObject* b );
33 void delete_arrays () ;
35 /** update the text string in the puList using the given node and
36 updating the requested offset. The value of dotFiles is taken
37 into account before the index is applied, i.e this should be
38 an index into 'children' */
39 void updateTextForEntry(int index);
44 char startDir [ PUSTRING_MAX * 2 ] ;
46 SGPropertyNode_ptr* children;
49 /** set if we're display the . and .. entries at the start of the
53 /* puInput *input ; */
60 puOneShot *cancel_button ;
61 puOneShot *ok_button ;
62 puArrowButton *down_arrow ;
63 puArrowButton *up_arrow ;
70 fgPropPicker ( int x, int y, int w, int h, int arrows,
71 const char *dir, const char *title = "Pick a file" ) ;
75 static void go_up_one_directory ( char *fname ) ;
76 static void chop_file ( char *fname ) ;
78 // over-ride the method from SGPropertyNodeListener
79 virtual void valueChanged (SGPropertyNode * node);
82 class fgPropEdit : public fgPopup
85 static void fgPropEditHandleCancel ( puObject *b ) ;
86 static void fgPropEditHandleOK ( puObject* b );
91 puOneShot *cancel_button ;
92 puOneShot *ok_button ;
99 char propPath [ PUSTRING_MAX * 2 ] ;
101 fgPropEdit ( const char *name, const char *value, char *proppath ) ;
105 static void go_up_one_directory ( char *fname ) ;
106 static void chop_file ( char *fname ) ;