1
// Copyright (C) 2006-2007 W. Pantke <gnome-color-chooser@punk-ass-bitch.org>
3
// This program is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation; either version 2 of the License, or
6
// (at your option) any later version.
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License
14
// along with this program; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
#include "modwidget.h"
20
void ModWidget::init(int id, TreeHandler* config)
22
this->isEngineWidget = false;
23
this->isParamWidget = false;
24
this->isProfileWidget = false;
26
this->setConfig(config);
27
ModWidget::register_widget(this);
31
void ModWidget::init(string category, string id, TreeHandler* config)
33
this->isEngineWidget = false;
34
this->isParamWidget = true;
35
this->isProfileWidget = false;
37
this->category = category;
38
this->setConfig(config);
39
// ModWidget::register_widget(this); // Don't register param widgets!!
43
void ModWidget::init(string category, TreeHandler* config) // as engine widget
45
this->isEngineWidget = true;
46
this->isParamWidget = false;
47
this->isProfileWidget = false;
48
this->category = category;
49
this->setConfig(config);
50
ModWidget::register_widget(this);
54
void ModWidget::init(TreeHandler* config) // as profile widget
56
this->isEngineWidget = false;
57
this->isParamWidget = false;
58
this->isProfileWidget = true;
59
this->setConfig(config);
60
ModWidget::register_widget(this);
65
void ModWidget::setConfig(TreeHandler* config)
67
this->m_pConfig = config;
70
GType ModWidget::get_base_type()
72
return gtk_widget_get_type();
75
void ModWidget::register_widget(ModWidget* new_widget)
79
widgets = new Widget();
80
widgets->p = new_widget;
84
Widget *widget = widgets;
85
while(widget->next != NULL)
86
widget = widget->next;
88
widget->next = new Widget();
90
widget->next->p = new_widget;
95
void ModWidget::reload_all_widgets()
97
Widget *widget = widgets;
103
widget = widget->next;
107
ModWidget::Widget::Widget()