PrefabSelector.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef PREFABS_H_
00026 #define PREFABS_H_
00027
00028 #include <gtk/gtk.h>
00029 #include <string>
00030
00031 namespace sidebar
00032 {
00033
00034 class PrefabSelector
00035 {
00036 private:
00037
00038 GtkWidget* _widget;
00039
00040 GtkTreeStore* _store;
00041
00042 GtkTreeModel* _fileFiltered;
00043
00044 GtkTreeModel* _fileSorted;
00045
00046 GtkTreeView* _view;
00047
00048 GtkEntry* _filterEntry;
00049
00050 int _selectedSelectionStrategy;
00051
00052 private:
00053
00054
00055 PrefabSelector ();
00056
00057
00058 static gboolean callbackFilterFiles (GtkTreeModel *model, GtkTreeIter *iter, PrefabSelector *self);
00059 static gboolean callbackRefilter (PrefabSelector *self);
00060 static void callbackSelectionOptionToggleExtend (GtkWidget *widget, PrefabSelector *self);
00061 static void callbackSelectionOptionToggleReplace (GtkWidget *widget, PrefabSelector *self);
00062 static void callbackSelectionOptionToggleUnselect (GtkWidget *widget, PrefabSelector *self);
00063 static gint callbackButtonPress (GtkWidget *widget, GdkEventButton *event, PrefabSelector *self);
00064
00065
00066 static gboolean FilterFileOrDirectory (GtkTreeModel *model, GtkTreeIter *entry, PrefabSelector *self);
00067 static gboolean FilterDirectory (GtkTreeModel *model, GtkTreeIter *possibleDirectory, PrefabSelector *self);
00068 public:
00069
00070 static std::string GetFullPath (const std::string& file);
00071
00072 static GtkWidget* ConstructNotebookTab (void);
00073
00074 GtkWidget* getWidget ();
00075 };
00076 }
00077
00078 #endif