[Scummvm-cvs-logs] SF.net SVN: scummvm: [30709] scummvm/trunk/gui
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Jan 30 23:51:21 CET 2008
Revision: 30709
http://scummvm.svn.sourceforge.net/scummvm/?rev=30709&view=rev
Author: sev
Date: 2008-01-30 14:51:21 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
Add ListWidget version with immediate parameters.
Modified Paths:
--------------
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/ListWidget.h
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2008-01-30 01:58:43 UTC (rev 30708)
+++ scummvm/trunk/gui/ListWidget.cpp 2008-01-30 22:51:21 UTC (rev 30709)
@@ -62,6 +62,36 @@
_editable = true;
}
+ListWidget::ListWidget(GuiObject *boss, int x, int y, int w, int h)
+ : EditableWidget(boss, x, y, w, h), CommandSender(boss) {
+
+ _scrollBar = NULL;
+ _textWidth = NULL;
+
+ // This ensures that _entriesPerPage is properly initialised.
+ reflowLayout();
+
+ _scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth + 1, 0, _scrollBarWidth, _h);
+ _scrollBar->setTarget(this);
+
+ setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
+ setHints(THEME_HINT_SAVE_BACKGROUND | THEME_HINT_USE_SHADOW);
+ _type = kListWidget;
+ _editMode = false;
+ _numberingMode = kListNumberingOne;
+ _currentPos = 0;
+ _selectedItem = -1;
+ _currentKeyDown = 0;
+
+ _quickSelectTime = 0;
+
+ // The item is selected, thus _bgcolor is used to draw the caret and _textcolorhi to erase it
+ _caretInverse = true;
+
+ // FIXME: This flag should come from widget definition
+ _editable = true;
+}
+
ListWidget::~ListWidget() {
delete[] _textWidth;
}
Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h 2008-01-30 01:58:43 UTC (rev 30708)
+++ scummvm/trunk/gui/ListWidget.h 2008-01-30 22:51:21 UTC (rev 30709)
@@ -75,6 +75,7 @@
public:
ListWidget(GuiObject *boss, const String &name);
+ ListWidget(GuiObject *boss, int x, int y, int w, int h);
virtual ~ListWidget();
virtual Widget *findWidget(int x, int y);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list