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 ;
68 fgPropPicker ( int x, int y, int w, int h, int arrows,
69 const char *dir, const char *title = "Pick a file" ) ;
73 static void go_up_one_directory ( char *fname ) ;
74 static void chop_file ( char *fname ) ;
76 // over-ride the method from SGPropertyNodeListener
77 virtual void valueChanged (SGPropertyNode * node);
80 class fgPropEdit : public fgPopup
83 static void fgPropEditHandleCancel ( puObject *b ) ;
84 static void fgPropEditHandleOK ( puObject* b );
89 puOneShot *cancel_button ;
90 puOneShot *ok_button ;
95 char propPath [ PUSTRING_MAX * 2 ] ;
97 fgPropEdit ( const char *name, const char *value, char *proppath ) ;
101 static void go_up_one_directory ( char *fname ) ;
102 static void chop_file ( char *fname ) ;