aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r--gui/widget.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 7a03be033e..38e8cfb322 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -35,7 +35,7 @@ Widget::Widget(GuiObject *boss, int x, int y, int w, int h)
init();
}
-Widget::Widget(GuiObject *boss, String name)
+Widget::Widget(GuiObject *boss, const String &name)
: GuiObject(name), _type(0), _boss(boss),
_id(0), _flags(0), _hints(THEME_HINT_FIRST_DRAW), _hasFocus(false) {
init();
@@ -148,7 +148,7 @@ StaticTextWidget::StaticTextWidget(GuiObject *boss, int x, int y, int w, int h,
_label = text;
}
-StaticTextWidget::StaticTextWidget(GuiObject *boss, String name, const String &text)
+StaticTextWidget::StaticTextWidget(GuiObject *boss, const String &name, const String &text)
: Widget(boss, name) {
_flags = WIDGET_ENABLED;
_type = kStaticTextWidget;
@@ -197,7 +197,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const St
_type = kButtonWidget;
}
-ButtonWidget::ButtonWidget(GuiObject *boss, String name, const String &label, uint32 cmd, uint8 hotkey)
+ButtonWidget::ButtonWidget(GuiObject *boss, const String &name, const String &label, uint32 cmd, uint8 hotkey)
: StaticTextWidget(boss, name, label), CommandSender(boss),
_cmd(cmd), _hotkey(hotkey) {
_flags = WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG;
@@ -221,7 +221,7 @@ CheckboxWidget::CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, cons
_type = kCheckboxWidget;
}
-CheckboxWidget::CheckboxWidget(GuiObject *boss, String name, const String &label, uint32 cmd, uint8 hotkey)
+CheckboxWidget::CheckboxWidget(GuiObject *boss, const String &name, const String &label, uint32 cmd, uint8 hotkey)
: ButtonWidget(boss, name, label, cmd, hotkey), _state(false) {
_flags = WIDGET_ENABLED;
_type = kCheckboxWidget;
@@ -256,7 +256,7 @@ SliderWidget::SliderWidget(GuiObject *boss, int x, int y, int w, int h, uint32 c
_type = kSliderWidget;
}
-SliderWidget::SliderWidget(GuiObject *boss, String name, uint32 cmd)
+SliderWidget::SliderWidget(GuiObject *boss, const String &name, uint32 cmd)
: Widget(boss, name), CommandSender(boss),
_cmd(cmd), _value(0), _oldValue(0), _valueMin(0), _valueMax(100), _isDragging(false) {
_flags = WIDGET_ENABLED | WIDGET_TRACK_MOUSE | WIDGET_CLEARBG;
@@ -318,7 +318,7 @@ GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h)
_hints &= ~THEME_HINT_SAVE_BACKGROUND;
}
-GraphicsWidget::GraphicsWidget(GuiObject *boss, String name)
+GraphicsWidget::GraphicsWidget(GuiObject *boss, const String &name)
: Widget(boss, name), _gfx(), _alpha(256), _transparency(false) {
_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
_type = kGraphicsWidget;
@@ -375,7 +375,7 @@ ContainerWidget::ContainerWidget(GuiObject *boss, int x, int y, int w, int h) :
_type = kContainerWidget;
}
-ContainerWidget::ContainerWidget(GuiObject *boss, String name) : Widget(boss, name) {
+ContainerWidget::ContainerWidget(GuiObject *boss, const String &name) : Widget(boss, name) {
_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
_type = kContainerWidget;
}