19 #ifndef _MFORMS_TASK_SIDEBAR_H_
20 #define _MFORMS_TASK_SIDEBAR_H_
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 TaskSectionRefreshable = 1,
47 TaskSectionCollapsible = 2,
48 TaskSectionToggleModeButton = 4,
49 TaskSectionToggleModeButtonPreSelected = 8,
50 TaskSectionShowConfigButton = 0x10,
53 inline TaskSectionFlags
operator | (TaskSectionFlags a, TaskSectionFlags b)
55 return (TaskSectionFlags)((int)a|(
int)b);
60 TaskEntrySelectableItem,
68 boost::signals2::signal<void (const std::string&)> _on_section_command;
74 static TaskSidebar* create(
const std::string &type);
77 virtual int add_section(
const std::string& name,
const std::string &title, TaskSectionFlags flags = TaskSectionPlain) = 0;
78 virtual void remove_section(
const std::string& name) = 0;
79 virtual int add_section_entry(
const std::string& section_name,
const std::string &entry_name,
const std::string& title,
80 const std::string& icon, TaskEntryType type) = 0;
81 virtual void set_section_entry_text(
const std::string& entry_name,
const std::string& title) = 0;
82 virtual void set_section_entry_icon(
const std::string& entry_name,
const std::string& icon) = 0;
83 virtual void set_section_entry_enabled(
const std::string& entry_name,
bool flag) = 0;
84 virtual void mark_section_busy(
const std::string& section_name,
bool busy) = 0;
85 virtual void remove_section_entry(
const std::string& entry_name) = 0;
87 virtual void set_collapse_states(
const std::string& data)= 0;
88 virtual std::string get_collapse_states()= 0;
90 virtual void clear_sections() = 0;
91 virtual void clear_section(
const std::string& section_name) = 0;
92 virtual void set_selection_color (
const std::string& color) = 0;
95 virtual int select_entry(
const std::string& entry_name) = 0;
96 virtual std::string selected_entry() = 0;
97 virtual void clear_selection() = 0;
99 boost::signals2::signal<void (const std::string&)>* on_section_command() {
return &_on_section_command;};
102 virtual void set_schema_model(wb::LiveSchemaTree* model) {}
103 virtual void set_filtered_schema_model(wb::LiveSchemaTree* model) {}
104 virtual void enable_server_search(
bool enabled) {}
106 virtual TreeNodeView *get_schema_tree() {
return NULL; }
107 virtual TextEntry *get_filter_entry() {
return NULL; }
109 virtual void expand_schema(
int schema_index) {}
111 virtual boost::signals2::signal<void (const std::string&)>* signal_filter_changed() {
return NULL; }
112 virtual boost::signals2::signal<void (void)>* tree_node_selected() {
return NULL; }
117 static void register_factory(
const std::string &type, TaskSidebar* (*create)());
123 #endif // !DOXYGEN_SHOULD_SKIP_THIS
124 #endif // _MFORMS_TASK_SIDEBAR_H_