When the right mouse button is clisked over a section title, it unfold that section and fold all the other one of the same level (RMB on Vignetting won't fold Resize)

This commit is contained in:
Hombre
2011-02-06 14:21:46 +01:00
parent 3711a6df5e
commit 4c6f9176c7
63 changed files with 738 additions and 656 deletions

View File

@@ -19,12 +19,16 @@
#ifndef __TOOLPANEL__
#define __TOOLPANEL__
#include <gtkmm.h>
#include <glibmm.h>
#include <rtengine.h>
#include <procparams.h>
#include <multilangmgr.h>
#include <paramsedited.h>
class ToolPanel;
class FoldableToolPanel;
class ToolPanelListener {
public:
@@ -43,6 +47,8 @@ class ToolPanel {
ToolPanel () : listener(NULL), tmp(NULL), batchMode(false) {}
void setParent (Gtk::Box* parent) {}
Gtk::Box* getParent () { return NULL; }
void setListener (ToolPanelListener* tpl) { listener = tpl; }
virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL) {}
virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL) {}
@@ -53,6 +59,22 @@ class ToolPanel {
virtual void setBatchMode (bool batchMode) { this->batchMode = batchMode; }
};
};
class FoldableToolPanel : public ToolPanel {
protected:
Gtk::Box* parentContainer;
void foldThemAll (GdkEventButton* event);
public:
Gtk::Expander* exp;
FoldableToolPanel(Gtk::Box* content);
void setParent (Gtk::Box* parent) { parentContainer = parent; }
Gtk::Box* getParent () { return parentContainer; }
void setLabel (Glib::ustring label) { exp->set_label(label); }
};
#endif