This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-zoomedit/SidebarToolbox.h
2007-12-04 21:35:01 +00:00

43 lines
935 B
C++

#ifndef SIDEBARTOOLBOX_H_
#define SIDEBARTOOLBOX_H_
#include <gtk/gtk.h>
#include <map>
#include <list>
#include "EditManager.h"
#include "Sidebar.h"
#include "Tool.h"
class SidebarToolbox : Sidebar {
private:
GtkWidget *widget;
std::list<Tool*> tools;
std::map<Tool*, GtkWidget*> buttons;
int cols, rows;
void updateRows(bool changed);
// prevent shallow copy
SidebarToolbox(const SidebarToolbox &w);
const SidebarToolbox& operator=(const SidebarToolbox &w);
static void toolAction(GtkWidget *button, Tool *tool);
static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation, SidebarToolbox *toolbox);
public:
SidebarToolbox();
virtual ~SidebarToolbox();
GtkWidget* getWidget() {
return widget;
}
void addTool(Tool *tool);
void removeTool(Tool *tool);
void update();
};
#endif /*SIDEBARTOOLBOX_H_*/