[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.2,1.3 widget.cpp,1.2,1.3

Max Horn fingolfin at users.sourceforge.net
Sun Jul 7 06:15:02 CEST 2002


Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv1241/gui

Modified Files:
	dialog.cpp widget.cpp 
Log Message:
applied indent to a couple of source files; added .indent.pro file with default indent settings as per readme.txt

Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dialog.cpp	6 Jul 2002 12:57:51 -0000	1.2
+++ dialog.cpp	7 Jul 2002 13:14:34 -0000	1.3
@@ -26,10 +26,10 @@
 void Dialog::draw()
 {
 	Widget *w = _firstWidget;
-	
+
 	_gui->clearArea(_x, _y, _w, _h);
 	_gui->box(_x, _y, _w, _h);
-	
+
 	while (w) {
 		w->draw();
 		w = w->_next;
@@ -60,7 +60,7 @@
  * Determine the widget at location (x,y) if any. Assumes the coordinates are
  * in the local coordinate system, i.e. relative to the top left of the dialog.
  */
-Widget* Dialog::findWidget(int x, int y)
+Widget *Dialog::findWidget(int x, int y)
 {
 	Widget *w = _firstWidget;
 	while (w) {
@@ -108,30 +108,30 @@
 #pragma mark -
 
 enum {
-	kSaveCmd	= 'SAVE',
-	kLoadCmd	= 'LOAD',
-	kPlayCmd	= 'PLAY',
-	kOptionsCmd	= 'OPTN',
-	kQuitCmd	= 'QUIT'
+	kSaveCmd = 'SAVE',
+	kLoadCmd = 'LOAD',
+	kPlayCmd = 'PLAY',
+	kOptionsCmd = 'OPTN',
+	kQuitCmd = 'QUIT'
 };
 
-SaveLoadDialog::SaveLoadDialog(NewGui *gui)
-	: Dialog(gui, 30, 20, 260, 124)
+SaveLoadDialog::SaveLoadDialog(NewGui * gui)
+:Dialog(gui, 30, 20, 260, 124)
 {
 	addResText(10, 7, 240, 16, 1);
-//	addResText(10, 7, 240, 16, 2);
-//	addResText(10, 7, 240, 16, 3);
-	
-	addButton(200,  20, 54, 16, 'S', 4, kSaveCmd);		// Save
-	addButton(200,  40, 54, 16, 'L', 5, kLoadCmd);		// Load
-	addButton(200,  60, 54, 16, 'P', 6, kPlayCmd);		// Play
-	addButton(200,  80, 54, 16, 'O', 17, kOptionsCmd);	// Options
-	addButton(200, 100, 54, 16, 'Q', 8, kQuitCmd);		// Quit
+//  addResText(10, 7, 240, 16, 2);
+//  addResText(10, 7, 240, 16, 3);
+
+	addButton(200, 20, 54, 16, 'S', 4, kSaveCmd);	// Save
+	addButton(200, 40, 54, 16, 'L', 5, kLoadCmd);	// Load
+	addButton(200, 60, 54, 16, 'P', 6, kPlayCmd);	// Play
+	addButton(200, 80, 54, 16, 'O', 17, kOptionsCmd);	// Options
+	addButton(200, 100, 54, 16, 'Q', 8, kQuitCmd);	// Quit
 }
 
 void SaveLoadDialog::handleCommand(uint32 cmd)
 {
-	switch(cmd) {
+	switch (cmd) {
 	case kSaveCmd:
 		break;
 	case kLoadCmd:
@@ -151,8 +151,8 @@
 #pragma mark -
 
 
-PauseDialog::PauseDialog(NewGui *gui)
-	: Dialog(gui, 50, 80, 220, 16)
+PauseDialog::PauseDialog(NewGui * gui)
+:Dialog(gui, 50, 80, 220, 16)
 {
 	addResText(2, 2, 220, 16, 10);
 }

Index: widget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- widget.cpp	6 Jul 2002 12:57:51 -0000	1.2
+++ widget.cpp	7 Jul 2002 13:14:34 -0000	1.3
@@ -24,8 +24,8 @@
 #include "newgui.h"
 
 
-Widget::Widget(Dialog *boss, int x, int y, int w, int h)
-	: _boss(boss), _x(x), _y(y), _w(w), _h(h), _id(0), _flags(0)
+Widget::Widget(Dialog * boss, int x, int y, int w, int h)
+:_boss(boss), _x(x), _y(y), _w(w), _h(h), _id(0), _flags(0)
 {
 	// Insert into the widget list of the boss
 	_next = _boss->_firstWidget;
@@ -40,26 +40,24 @@
 	// Account for our relative position in the dialog
 	_x += _boss->_x;
 	_y += _boss->_y;
-	
+
 	// Clear background
 	if (_flags & WIDGET_CLEARBG)
 		_boss->_gui->clearArea(_x, _y, _w, _h);
-	
+
 	// Draw border
 	if (_flags & WIDGET_BORDER) {
 		_boss->_gui->box(_x, _y, _w, _h);
 		_x += 4;
 		_y += 4;
 	}
-	
 	// Now perform the actual widget draw
 	drawWidget(_flags & WIDGET_HILITED);
-	
+
 	if (_flags & WIDGET_BORDER) {
 		_x -= 4;
 		_y -= 4;
 	}
-	
 	// Restore x/y
 	_x -= _boss->_x;
 	_y -= _boss->_y;
@@ -69,8 +67,8 @@
 #pragma mark -
 
 
-StaticTextWidget::StaticTextWidget(Dialog *boss, int x, int y, int w, int h, const char *text)
-	: Widget(boss, x, y, w, h)
+StaticTextWidget::StaticTextWidget(Dialog * boss, int x, int y, int w, int h, const char *text)
+:Widget(boss, x, y, w, h)
 {
 	// FIXME - maybe we should make a real copy of the string?
 	_text = text;
@@ -78,7 +76,7 @@
 
 void StaticTextWidget::drawWidget(bool hilite)
 {
-	NewGui	*gui = _boss->_gui;
+	NewGui *gui = _boss->_gui;
 	gui->drawString(_text, _x, _y, _w, hilite ? gui->_textcolorhi : gui->_textcolor);
 }
 
@@ -86,10 +84,10 @@
 #pragma mark -
 
 
-ButtonWidget::ButtonWidget(Dialog *boss, int x, int y, int w, int h, const char *label, uint32 cmd)
-	: StaticTextWidget(boss, x, y, w, h, label), _cmd(cmd), _hotkey(0)
+ButtonWidget::ButtonWidget(Dialog * boss, int x, int y, int w, int h, const char *label, uint32 cmd)
+:StaticTextWidget(boss, x, y, w, h, label), _cmd(cmd), _hotkey(0)
 {
-	_flags = WIDGET_ENABLED | WIDGET_BORDER /* | WIDGET_CLEARBG */;
+	_flags = WIDGET_ENABLED | WIDGET_BORDER /* | WIDGET_CLEARBG */ ;
 }
 
 void ButtonWidget::handleClick(int button)





More information about the Scummvm-git-logs mailing list