[Orxonox-commit 3995] r8669 - in code/branches/unity_build/src/libraries/core: . command
rgrieder at orxonox.net
rgrieder at orxonox.net
Sun May 29 22:56:57 CEST 2011
Author: rgrieder
Date: 2011-05-29 22:56:57 +0200 (Sun, 29 May 2011)
New Revision: 8669
Modified:
code/branches/unity_build/src/libraries/core/GUIManager.cc
code/branches/unity_build/src/libraries/core/GUIManager.h
code/branches/unity_build/src/libraries/core/command/Shell.cc
code/branches/unity_build/src/libraries/core/command/Shell.h
Log:
Moved a few methods from header to source.
Modified: code/branches/unity_build/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/unity_build/src/libraries/core/GUIManager.cc 2011-05-29 17:15:43 UTC (rev 8668)
+++ code/branches/unity_build/src/libraries/core/GUIManager.cc 2011-05-29 20:56:57 UTC (rev 8669)
@@ -645,6 +645,14 @@
listbox->setItemTooltipsEnabled(enabled);
}
+ /** Helper method to get the developer's mode without having to export Core.h.
+ @see Core::inDevMode
+ */
+ /*static*/ bool GUIManager::inDevMode()
+ {
+ return Core::getInstance().inDevMode();
+ }
+
/**
@brief Callback of window event listener, called if the window is resized. Sets the display size of CEGUI.
*/
Modified: code/branches/unity_build/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/unity_build/src/libraries/core/GUIManager.h 2011-05-29 17:15:43 UTC (rev 8668)
+++ code/branches/unity_build/src/libraries/core/GUIManager.h 2011-05-29 20:56:57 UTC (rev 8669)
@@ -38,7 +38,6 @@
#include "CorePrereqs.h"
#include <map>
-#include <set>
#include <string>
#include <CEGUIForwardRefs.h>
#include <CEGUIVersion.h>
@@ -49,7 +48,6 @@
#include "util/TriBool.h"
#include "util/Singleton.h"
#include "input/InputHandler.h"
-#include "Core.h"
#include "OrxonoxClass.h"
#include "WindowEventListener.h"
@@ -103,11 +101,7 @@
void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
void setBackgroundImage(const std::string& image);
- /**
- @brief Helper method to get the developer's mode without having to export Core.h.
- @see Core::inDevMode
- */
- static bool inDevMode(void) { return Core::getInstance().inDevMode(); } // tolua_export
+ static bool inDevMode(void); // tolua_export
//! Creates a new InputState to be used with a GUI Sheet
const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
Modified: code/branches/unity_build/src/libraries/core/command/Shell.cc
===================================================================
--- code/branches/unity_build/src/libraries/core/command/Shell.cc 2011-05-29 17:15:43 UTC (rev 8668)
+++ code/branches/unity_build/src/libraries/core/command/Shell.cc 2011-05-29 20:56:57 UTC (rev 8669)
@@ -33,6 +33,7 @@
#include "Shell.h"
+#include "util/Math.h"
#include "util/OutputHandler.h"
#include "util/StringUtils.h"
#include "util/SubString.h"
@@ -40,6 +41,7 @@
#include "core/ConfigFileManager.h"
#include "core/ConfigValueIncludes.h"
#include "core/PathConfig.h"
+#include "core/input/InputBuffer.h"
#include "CommandExecutor.h"
#include "ConsoleCommand.h"
@@ -236,6 +238,18 @@
this->updateListeners<&ShellListener::cursorChanged>();
}
+ /// Returns the current position of the cursor in the input buffer.
+ unsigned int Shell::getCursorPosition() const
+ {
+ return this->inputBuffer_->getCursorPosition();
+ }
+
+ /// Returns the current content of the input buffer (the text which was entered by the user)
+ const std::string& Shell::getInput() const
+ {
+ return this->inputBuffer_->get();
+ }
+
/**
@brief Sends output to the internal output buffer.
*/
Modified: code/branches/unity_build/src/libraries/core/command/Shell.h
===================================================================
--- code/branches/unity_build/src/libraries/core/command/Shell.h 2011-05-29 17:15:43 UTC (rev 8668)
+++ code/branches/unity_build/src/libraries/core/command/Shell.h 2011-05-29 20:56:57 UTC (rev 8669)
@@ -50,7 +50,6 @@
#include "util/OutputHandler.h"
#include "core/Core.h"
#include "core/OrxonoxClass.h"
-#include "core/input/InputBuffer.h"
namespace orxonox
{
@@ -119,13 +118,9 @@
{ return this->inputBuffer_; }
void setCursorPosition(unsigned int cursor);
- /// Returns the current position of the cursor in the input buffer.
- inline unsigned int getCursorPosition() const
- { return this->inputBuffer_->getCursorPosition(); }
+ unsigned int getCursorPosition() const;
- /// Returns the current content of the input buffer (the text which was entered by the user)
- inline const std::string& getInput() const
- { return this->inputBuffer_->get(); }
+ const std::string& getInput() const;
typedef std::list<std::pair<std::string, LineType> > LineList;
LineList::const_iterator getNewestLineIterator() const;
More information about the Orxonox-commit
mailing list