Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions libgag/include/BinaryStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __BINARYSTREAM_H
#define __BINARYSTREAM_H
#ifndef __BINARY_STREAM_H
#define __BINARY_STREAM_H

#include <Stream.h>
#include <StreamBackend.h>
Expand All @@ -41,16 +41,16 @@ namespace GAGCore

virtual void write(const void *data, const size_t size, const std::string name);

virtual void writeEndianIndependant(const void *v, const size_t size, const std::string name);
virtual void writeEndianIndependent(const void *v, const size_t size, const std::string name);

virtual void writeSint8(const Sint8 v, const std::string name) { this->write(&v, 1, name); }
virtual void writeUint8(const Uint8 v, const std::string name) { this->write(&v, 1, name); }
virtual void writeSint16(const Sint16 v, const std::string name) { this->writeEndianIndependant(&v, 2, name); }
virtual void writeUint16(const Uint16 v, const std::string name) { this->writeEndianIndependant(&v, 2, name); }
virtual void writeSint32(const Sint32 v, const std::string name) { this->writeEndianIndependant(&v, 4, name); }
virtual void writeUint32(const Uint32 v, const std::string name) { this->writeEndianIndependant(&v, 4, name); }
virtual void writeFloat(const float v, const std::string name) { this->writeEndianIndependant(&v, 4, name); }
virtual void writeDouble(const double v, const std::string name) { this->writeEndianIndependant(&v, 8, name); }
virtual void writeSint16(const Sint16 v, const std::string name) { this->writeEndianIndependent(&v, 2, name); }
virtual void writeUint16(const Uint16 v, const std::string name) { this->writeEndianIndependent(&v, 2, name); }
virtual void writeSint32(const Sint32 v, const std::string name) { this->writeEndianIndependent(&v, 4, name); }
virtual void writeUint32(const Uint32 v, const std::string name) { this->writeEndianIndependent(&v, 4, name); }
virtual void writeFloat(const float v, const std::string name) { this->writeEndianIndependent(&v, 4, name); }
virtual void writeDouble(const double v, const std::string name) { this->writeEndianIndependent(&v, 8, name); }
virtual void writeText(const std::string &v, const std::string name);

virtual void flush(void) { backend->flush(); }
Expand Down Expand Up @@ -85,16 +85,16 @@ namespace GAGCore

virtual void read(void *data, size_t size, const std::string name) { backend->read(data, size); }

virtual void readEndianIndependant(void *v, size_t size, const std::string name);
virtual void readEndianIndependent(void *v, size_t size, const std::string name);

virtual Sint8 readSint8(const std::string name) { Sint8 i; this->read(&i, 1, name); return i; }
virtual Uint8 readUint8(const std::string name) { Uint8 i; this->read(&i, 1, name); return i; }
virtual Sint16 readSint16(const std::string name) { Sint16 i; this->readEndianIndependant(&i, 2, name); return i; }
virtual Uint16 readUint16(const std::string name) { Uint16 i; this->readEndianIndependant(&i, 2, name); return i; }
virtual Sint32 readSint32(const std::string name) { Sint32 i; this->readEndianIndependant(&i, 4, name); return i; }
virtual Uint32 readUint32(const std::string name) { Uint32 i; this->readEndianIndependant(&i, 4, name); return i; }
virtual float readFloat(const std::string name) { float f; this->readEndianIndependant(&f, 4, name); return f; }
virtual double readDouble(const std::string name) { double d; this->readEndianIndependant(&d, 8, name); return d; }
virtual Sint16 readSint16(const std::string name) { Sint16 i; this->readEndianIndependent(&i, 2, name); return i; }
virtual Uint16 readUint16(const std::string name) { Uint16 i; this->readEndianIndependent(&i, 2, name); return i; }
virtual Sint32 readSint32(const std::string name) { Sint32 i; this->readEndianIndependent(&i, 4, name); return i; }
virtual Uint32 readUint32(const std::string name) { Uint32 i; this->readEndianIndependent(&i, 4, name); return i; }
virtual float readFloat(const std::string name) { float f; this->readEndianIndependent(&f, 4, name); return f; }
virtual double readDouble(const std::string name) { double d; this->readEndianIndependent(&d, 8, name); return d; }
virtual std::string readText(const std::string name);

virtual void readEnterSection(const std::string name) { }
Expand Down
14 changes: 7 additions & 7 deletions libgag/include/FileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __FILEMANAGER_H
#define __FILEMANAGER_H
#ifndef __FILE_MANAGER_H
#define __FILE_MANAGER_H

#include "GAGSys.h"
#include <vector>
Expand Down Expand Up @@ -66,11 +66,11 @@ namespace GAGCore
//! internal function that does the real listing job
bool addListingForDir(const std::string realDir, const std::string extension="", const bool dirs=false);
//! open a file, if it is in writing, do a backup
SDL_RWops *openWithbackup(const std::string filename, const std::string mode);
SDL_RWops *openWithBackup(const std::string filename, const std::string mode);
//! open a file, if it is in writing, do a backup, fopen version
FILE *openWithbackupFP(const std::string filename, const std::string mode);
FILE *openWithBackupFP(const std::string filename, const std::string mode);
//! open a file, if it is in writing, do a backup, std::ofstream version
std::ofstream *openWithbackupOFS(const std::string filename, std::ofstream::openmode mode);
std::ofstream *openWithBackupOFS(const std::string filename, std::ofstream::openmode mode);

public:
//! FileManager constructor
Expand All @@ -92,9 +92,9 @@ namespace GAGCore
//! Returns true if filename is a directory
bool isDir(const std::string filename);

//! Compress source to dest uzing gzip, returns true on success
//! Compress source to dest using gzip, returns true on success
bool gzip(const std::string &source, const std::string &dest);
//! Uncompress source to dest uzing gzip, returns true on success
//! Uncompress source to dest using gzip, returns true on success
bool gunzip(const std::string &source, const std::string &dest);

//! Open an output stream backend, use it to construct specific output streams
Expand Down
24 changes: 12 additions & 12 deletions libgag/include/FormatableString.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef FORMATABLESTRING_H
#define FORMATABLESTRING_H
#ifndef FORMATABLE_STRING_H
#define FORMATABLE_STRING_H

#include <string>
#include <sstream>
Expand All @@ -27,10 +27,10 @@ namespace GAGCore {
/*!
* string that can be used for argument substitution.
* Example :
* FormatableString fs("Hello %0");
* FormattableString fs("Hello %0");
* cout << fs.arg("World");
*/
class FormatableString : public std::string
class FormattableString : public std::string
{
private:
/*!
Expand All @@ -45,14 +45,14 @@ namespace GAGCore {

public:

FormatableString() : std::string(), argLevel(0) { }
FormattableString() : std::string(), argLevel(0) { }
/*!
* Creates a new FormatableString with format string set to s.
* Creates a new FormattableString with format string set to s.
* \param s A string with indicators for argument substitution.
* Each indicator is the % symbol followed by a number. The number
* is the index of the corresponding argument (starting at %0).
*/
FormatableString(const std::string &s)
FormattableString(const std::string &s)
: std::string(s), argLevel(0) { }

/*!
Expand All @@ -63,7 +63,7 @@ namespace GAGCore {
* \param fillChar Character used to pad the number to reach fieldWidth
* \see arg(const T& value)
*/
FormatableString &arg(int value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
FormattableString &arg(int value, int fieldWidth = 0, int base = 10, char fillChar = ' ');

/*!
* Replace the next arg by an int value.
Expand All @@ -73,7 +73,7 @@ namespace GAGCore {
* \param fillChar Character used to pad the number to reach fieldWidth
* \see arg(const T& value)
*/
FormatableString &arg(unsigned value, int fieldWidth = 0, int base = 10, char fillChar = ' ');
FormattableString &arg(unsigned value, int fieldWidth = 0, int base = 10, char fillChar = ' ');

/*!
* Replace the next arg by a float value.
Expand All @@ -83,14 +83,14 @@ namespace GAGCore {
* \param fillChar Character used to pad the number to reach fieldWidth.
* \see arg(const T& value)
*/
FormatableString &arg(float value, int fieldWidth = 0, int precision = 6, char fillChar = ' ');
FormattableString &arg(float value, int fieldWidth = 0, int precision = 6, char fillChar = ' ');

/*!
* Replace the next arg by a value that can be passed to an ostringstream.
* The first call to arg replace %0, the second %1, and so on.
* \param value Value used to replace the current argument.
*/
template <typename T> FormatableString &arg(const T& value)
template <typename T> FormattableString &arg(const T& value)
{
// transform value into std::string
std::ostringstream oss;
Expand All @@ -107,7 +107,7 @@ namespace GAGCore {
* counter.
* \param str New format string.
*/
FormatableString& operator=(const std::string& str) ;
FormattableString& operator=(const std::string& str) ;

/*!
* Casts this string to a const char*
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GAGSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GAGSYS_H
#define __GAGSYS_H
#ifndef __GAG_SYS_H
#define __GAG_SYS_H

#ifndef MAX_SINT32
#define MAX_SINT32 0x7FFFFFFF
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIAnimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIANIMATION_H
#define __GUIANIMATION_H
#ifndef __GUI_ANIMATION_H
#define __GUI_ANIMATION_H

#include "GUIBase.h"
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIBASE_H
#define __GUIBASE_H
#ifndef __GUI_BASE_H
#define __GUI_BASE_H

#include "GAGSys.h"
#include "GraphicContext.h"
Expand Down
8 changes: 4 additions & 4 deletions libgag/include/GUIButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIBUTTON_H
#define __GUIBUTTON_H
#ifndef __GUI_BUTTON_H
#define __GUI_BUTTON_H

#include "GUIBase.h"
#include <string>
Expand Down Expand Up @@ -163,8 +163,8 @@ namespace GAGGUI

public:
MultiTextButton() { textIndex=0; returnCode=0; }
MultiTextButton(int x, int y, int w, int h, Uint32 hAlign, Uint32 vAlign, const std::string font, const std::string text, int retuxrnCode, Uint16 unicodeShortcut=0);
MultiTextButton(int x, int y, int w, int h, Uint32 hAlign, Uint32 vAlign, const std::string font, const std::string text, int retuxrnCode, const std::string& tooltip, const std::string &tooltipFont, Uint16 unicodeShortcut=0);
MultiTextButton(int x, int y, int w, int h, Uint32 hAlign, Uint32 vAlign, const std::string font, const std::string text, int returnCode, Uint16 unicodeShortcut=0);
MultiTextButton(int x, int y, int w, int h, Uint32 hAlign, Uint32 vAlign, const std::string font, const std::string text, int returnCode, const std::string& tooltip, const std::string &tooltipFont, Uint16 unicodeShortcut=0);
virtual ~MultiTextButton() { }


Expand Down
2 changes: 1 addition & 1 deletion libgag/include/GUICheckList.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "GUIList.h"

///A CheckList is bassically like a list, except that each item is either checked off or it isn't
///A CheckList is basically like a list, except that each item is either checked off or it isn't

namespace GAGGUI
{
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIFileList.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIFILELIST_H
#define __GUIFILELIST_H
#ifndef __GUI_FILELIST_H
#define __GUI_FILELIST_H

#include "FileManager.h"
#include "GUIList.h"
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIIMAGE_H
#define __GUIIMAGE_H
#ifndef __GUI_IMAGE_H
#define __GUI_IMAGE_H

#include "GUIBase.h"
#include "GraphicContext.h"
Expand Down
2 changes: 1 addition & 1 deletion libgag/include/GUIKeySelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace GAGGUI
class KeySelector: public HighlightableWidget
{
public:
//Construct with given cordinates
//Construct with given coordinates
KeySelector(int x, int y, Uint32 hAlign, Uint32 vAlign, const std::string font, int w=0, int h=0);
//Construct with tooltip
KeySelector(int x, int y, Uint32 hAlign, Uint32 vAlign, const std::string font, const std::string& tooltip, const std::string &tooltipFont, int w=0, int h=0);
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIList.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUILIST_H
#define __GUILIST_H
#ifndef __GUI_LIST_H
#define __GUI_LIST_H

#include "GUIBase.h"
#include <vector>
Expand Down
12 changes: 6 additions & 6 deletions libgag/include/GUIMessageBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIMESSAGEBOX_H
#define __GUIMESSAGEBOX_H
#ifndef __GUI_MESSAGE_BOX_H
#define __GUI_MESSAGE_BOX_H

#include "GUIBase.h"

Expand All @@ -28,15 +28,15 @@ namespace GAGGUI
enum MessageBoxType
{
//! One button (like OK)
MB_ONEBUTTON,
MB_ONE_BUTTON,
//! Two buttons (like Ok, Cancel)
MB_TWOBUTTONS,
MB_TWO_BUTTONS,
//! three buttons, (like Yes, No, Cancel)
MB_THREEBUTTONS
MB_THREE_BUTTONS
};

//! The display a modal message box, with a title and some buttons
//! \retval the nummer of the clicked button, -1 on unexpected early-out (CTRL-C, ...)
//! \retval the number of the clicked button, -1 on unexpected early-out (CTRL-C, ...)
int MessageBox(GAGCore::GraphicContext *parentCtx, const std::string font, MessageBoxType type, std::string title, std::string caption1, std::string caption2 = "", std::string caption3 = "");
}

Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIProgressBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUIPROGRESS_BAR_H
#define __GUIPROGRESS_BAR_H
#ifndef __GUI_PROGRESS_BAR_H
#define __GUI_PROGRESS_BAR_H

#include "GUIBase.h"
#include "GraphicContext.h"
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUISelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUISELECTOR_H
#define __GUISELECTOR_H
#ifndef __GUI_SELECTOR_H
#define __GUI_SELECTOR_H

#include "GUIBase.h"
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions libgag/include/GUIStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef __GUISTYLE_H
#define __GUISTYLE_H
#ifndef __GUI_STYLE_H
#define __GUI_STYLE_H

#include "GraphicContext.h"

Expand Down
8 changes: 4 additions & 4 deletions libgag/include/GUITabScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef GUITabScreen_h
#define GUITabScreen_h
#ifndef __GUI_TAB_SCREEN_H
#define __GUI_TAB_SCREEN_H

#include "GUIBase.h"
#include <map>
Expand All @@ -45,7 +45,7 @@ namespace GAGGUI
///This removes a widget from a particular group. This calls remove widget automatically
void removeWidgetFromGroup(Widget* widget, int group_n);

///This sets a particular TabScreenWindow to a group_n. TabScreenWindows recieve events from the widgets
///This sets a particular TabScreenWindow to a group_n. TabScreenWindows receive events from the widgets
///in their group.
void setTabScreenWindowToGroup(TabScreenWindow* window, int group_n);

Expand All @@ -64,7 +64,7 @@ namespace GAGGUI
///This removes a title for a group, removing the group and any widgets in it
void removeGroup(int group_n);

///Recieves the action. Child classes should call this one first
///Receives the action. Child classes should call this one first
void onAction(Widget *source, Action action, int par1, int par2);

///This is called when a group has been activated
Expand Down
Loading