From 3d5d2b54f23901ccd11641f4df95b5c6a4c10664 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 10 Jan 2010 22:37:56 +0000 Subject: Added a function to copy an entire Fl_Preferences database into an Fl_Tree view. This will break IDEs that do not have Fl_Tree and Fl_Table added yet! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6992 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Preferences.H | 5 ++++- FL/Fl_Tree.H | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H index e16ff64d3..a5f56c1e6 100644 --- a/FL/Fl_Preferences.H +++ b/FL/Fl_Preferences.H @@ -146,6 +146,8 @@ public: // char export( const char *filename, Type fileFormat ); // char import( const char *filename ); + + char copyTo(class Fl_Tree*); /** 'Name' provides a simple method to create numerical or more complex @@ -206,12 +208,14 @@ private: public: Node( const char *path ); ~Node(); + char copyTo(class Fl_Tree*, class Fl_Tree_Item*); // node methods int write( FILE *f ); const char *name(); const char *path() { return path_; } Node *find( const char *path ); Node *search( const char *path, int offset=0 ); + Node *childNode( int ix ); Node *addChild( const char *path ); void setParent( Node *parent ); Node *parent() { return top_?0L:parent_; } @@ -222,7 +226,6 @@ private: // entry methods int nChildren(); const char *child( int ix ); - Node *childNode( int ix ); void set( const char *name, const char *value ); void set( const char *line ); void add( const char *line ); diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H index 7404d8936..db9f46f60 100644 --- a/FL/Fl_Tree.H +++ b/FL/Fl_Tree.H @@ -94,7 +94,7 @@ /// Fl_Tree_Item::closeicon(), /// Fl_Tree_Item::usericon(). /// -/// Various default preferences can be manipulated vi Fl_Tree_Prefs, including +/// Various default preferences can be manipulated via Fl_Tree_Prefs, including /// colors, margins, connection lines. /// /// \image html tree-elements.png -- cgit v1.2.3