From ddead8978beb48a42a6783a5876436f2ee6d1fbc Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 20 Nov 2015 15:14:49 -1000 Subject: [PATCH] Added source stubs --- specter/CMakeLists.txt | 47 ++++++++++++++++++++++++ specter/include/Specter/Button.hpp | 4 ++ specter/include/Specter/Control.hpp | 4 ++ specter/include/Specter/Menu.hpp | 4 ++ specter/include/Specter/Node.hpp | 4 ++ specter/include/Specter/NodeSocket.hpp | 4 ++ specter/include/Specter/NumericField.hpp | 4 ++ specter/include/Specter/Outliner.hpp | 4 ++ specter/include/Specter/Panel.hpp | 4 ++ specter/include/Specter/RootView.hpp | 34 +++++++++++++++++ specter/include/Specter/Space.hpp | 4 ++ specter/include/Specter/Specter.hpp | 16 ++++++++ specter/include/Specter/Table.hpp | 4 ++ specter/include/Specter/TextField.hpp | 4 ++ specter/include/Specter/View.hpp | 13 +++++++ specter/lib/Button.cpp | 0 specter/lib/Control.cpp | 0 specter/lib/Menu.cpp | 0 specter/lib/Node.cpp | 0 specter/lib/NodeSocket.cpp | 0 specter/lib/NumericField.cpp | 0 specter/lib/Outliner.cpp | 0 specter/lib/Panel.cpp | 0 specter/lib/RootView.cpp | 3 ++ specter/lib/Space.cpp | 0 specter/lib/Specter.cpp | 0 specter/lib/Table.cpp | 0 specter/lib/TextField.cpp | 0 28 files changed, 157 insertions(+) create mode 100644 specter/lib/Button.cpp create mode 100644 specter/lib/Control.cpp create mode 100644 specter/lib/Menu.cpp create mode 100644 specter/lib/Node.cpp create mode 100644 specter/lib/NodeSocket.cpp create mode 100644 specter/lib/NumericField.cpp create mode 100644 specter/lib/Outliner.cpp create mode 100644 specter/lib/Panel.cpp create mode 100644 specter/lib/RootView.cpp create mode 100644 specter/lib/Space.cpp create mode 100644 specter/lib/Specter.cpp create mode 100644 specter/lib/Table.cpp create mode 100644 specter/lib/TextField.cpp diff --git a/specter/CMakeLists.txt b/specter/CMakeLists.txt index e69de29bb..b1fdf2dbf 100644 --- a/specter/CMakeLists.txt +++ b/specter/CMakeLists.txt @@ -0,0 +1,47 @@ +add_subdirectory(freetype2) + +if(NOT DEFINED HECL_INCLUDE_DIR) + message(FATAL_ERROR "Specter may only be built as a sub-project containing hecl with + HECL_INCLUDE_DIR set") +endif() + +if(NOT DEFINED BOO_INCLUDE_DIR) + message(FATAL_ERROR "Specter may only be built as a sub-project containing boo with + BOO_INCLUDE_DIR set") +endif() + +include_directories(include ${HECL_INCLUDE_DIR} ${BOO_INCLUDE_DIR}) + +list(APPEND SPECTER_HEADERS + include/Specter/Specter.hpp + include/Specter/View.hpp + include/Specter/RootView.hpp + include/Specter/Space.hpp + include/Specter/Table.hpp + include/Specter/Outliner.hpp + include/Specter/Panel.hpp + include/Specter/Control.hpp + include/Specter/Button.hpp + include/Specter/TextField.hpp + include/Specter/NumericField.hpp + include/Specter/Menu.hpp + include/Specter/Node.hpp + include/Specter/NodeSocket.hpp) + +list(APPEND SPECTER_SOURCES + lib/Specter.cpp + lib/View.cpp + lib/RootView.cpp + lib/Space.cpp + lib/Table.cpp + lib/Outliner.cpp + lib/Panel.cpp + lib/Control.cpp + lib/Button.cpp + lib/TextField.cpp + lib/NumericField.cpp + lib/Menu.cpp + lib/Node.cpp + lib/NodeSocket.cpp) + +add_library(Specter ${SPECTER_SOURCES} ${SPECTER_HEADERS}) diff --git a/specter/include/Specter/Button.hpp b/specter/include/Specter/Button.hpp index e69de29bb..5aa4ffe3c 100644 --- a/specter/include/Specter/Button.hpp +++ b/specter/include/Specter/Button.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_BUTTON_HPP +#define SPECTER_BUTTON_HPP + +#endif // SPECTER_BUTTON_HPP diff --git a/specter/include/Specter/Control.hpp b/specter/include/Specter/Control.hpp index e69de29bb..f301b76c6 100644 --- a/specter/include/Specter/Control.hpp +++ b/specter/include/Specter/Control.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_CONTROL_HPP +#define SPECTER_CONTROL_HPP + +#endif // SPECTER_CONTROL_HPP diff --git a/specter/include/Specter/Menu.hpp b/specter/include/Specter/Menu.hpp index e69de29bb..fee128b15 100644 --- a/specter/include/Specter/Menu.hpp +++ b/specter/include/Specter/Menu.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_MENU_HPP +#define SPECTER_MENU_HPP + +#endif // SPECTER_MENU_HPP diff --git a/specter/include/Specter/Node.hpp b/specter/include/Specter/Node.hpp index e69de29bb..04aa43777 100644 --- a/specter/include/Specter/Node.hpp +++ b/specter/include/Specter/Node.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_NODE_HPP +#define SPECTER_NODE_HPP + +#endif // SPECTER_NODE_HPP diff --git a/specter/include/Specter/NodeSocket.hpp b/specter/include/Specter/NodeSocket.hpp index e69de29bb..51cff7ddb 100644 --- a/specter/include/Specter/NodeSocket.hpp +++ b/specter/include/Specter/NodeSocket.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_NODESOCKET_HPP +#define SPECTER_NODESOCKET_HPP + +#endif // SPECTER_NODESOCKET_HPP diff --git a/specter/include/Specter/NumericField.hpp b/specter/include/Specter/NumericField.hpp index e69de29bb..8480a2a1f 100644 --- a/specter/include/Specter/NumericField.hpp +++ b/specter/include/Specter/NumericField.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_NUMERICFIELD_HPP +#define SPECTER_NUMERICFIELD_HPP + +#endif // SPECTER_NUMERICFIELD_HPP diff --git a/specter/include/Specter/Outliner.hpp b/specter/include/Specter/Outliner.hpp index e69de29bb..f35be4f32 100644 --- a/specter/include/Specter/Outliner.hpp +++ b/specter/include/Specter/Outliner.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_OUTLINER_HPP +#define SPECTER_OUTLINER_HPP + +#endif // SPECTER_OUTLINER_HPP diff --git a/specter/include/Specter/Panel.hpp b/specter/include/Specter/Panel.hpp index e69de29bb..1dfa6a358 100644 --- a/specter/include/Specter/Panel.hpp +++ b/specter/include/Specter/Panel.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_PANEL_HPP +#define SPECTER_PANEL_HPP + +#endif // SPECTER_PANEL_HPP diff --git a/specter/include/Specter/RootView.hpp b/specter/include/Specter/RootView.hpp index e69de29bb..9a029beec 100644 --- a/specter/include/Specter/RootView.hpp +++ b/specter/include/Specter/RootView.hpp @@ -0,0 +1,34 @@ +#ifndef SPECTER_ROOTVIEW_HPP +#define SPECTER_ROOTVIEW_HPP + +#include "View.hpp" +#include + +namespace Specter +{ + +class RootView : public View, boo::IWindowCallback +{ + void resized(const boo::SWindowRect& rect); + void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods); + void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods); + void mouseMove(const boo::SWindowCoord& coord); + void mouseEnter(const boo::SWindowCoord& coord); + void mouseLeave(const boo::SWindowCoord& coord); + void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll); + + void touchDown(const boo::STouchCoord& coord, uintptr_t tid); + void touchUp(const boo::STouchCoord& coord, uintptr_t tid); + void touchMove(const boo::STouchCoord& coord, uintptr_t tid); + + void charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat); + void charKeyUp(unsigned long charCode, boo::EModifierKey mods); + void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat); + void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods); + void modKeyDown(boo::EModifierKey mod, bool isRepeat); + void modKeyUp(boo::EModifierKey mod); +}; + +} + +#endif // SPECTER_ROOTVIEW_HPP diff --git a/specter/include/Specter/Space.hpp b/specter/include/Specter/Space.hpp index e69de29bb..a752aa38a 100644 --- a/specter/include/Specter/Space.hpp +++ b/specter/include/Specter/Space.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_SPACE_HPP +#define SPECTER_SPACE_HPP + +#endif // SPECTER_SPACE_HPP diff --git a/specter/include/Specter/Specter.hpp b/specter/include/Specter/Specter.hpp index e69de29bb..eb7d49108 100644 --- a/specter/include/Specter/Specter.hpp +++ b/specter/include/Specter/Specter.hpp @@ -0,0 +1,16 @@ +#ifndef SPECTER_HPP +#define SPECTER_HPP + +#include "Space.hpp" +#include "Table.hpp" +#include "Outliner.hpp" +#include "Panel.hpp" +#include "Control.hpp" +#include "Button.hpp" +#include "TextField.hpp" +#include "NumericField.hpp" +#include "Menu.hpp" +#include "Node.hpp" +#include "NodeSocket.hpp" + +#endif // SPECTER_HPP diff --git a/specter/include/Specter/Table.hpp b/specter/include/Specter/Table.hpp index e69de29bb..29e212357 100644 --- a/specter/include/Specter/Table.hpp +++ b/specter/include/Specter/Table.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_TABLE_HPP +#define SPECTER_TABLE_HPP + +#endif // SPECTER_TABLE_HPP diff --git a/specter/include/Specter/TextField.hpp b/specter/include/Specter/TextField.hpp index e69de29bb..30737c263 100644 --- a/specter/include/Specter/TextField.hpp +++ b/specter/include/Specter/TextField.hpp @@ -0,0 +1,4 @@ +#ifndef SPECTER_TEXTFIELD_HPP +#define SPECTER_TEXTFIELD_HPP + +#endif // SPECTER_TEXTFIELD_HPP diff --git a/specter/include/Specter/View.hpp b/specter/include/Specter/View.hpp index e69de29bb..09fefbc36 100644 --- a/specter/include/Specter/View.hpp +++ b/specter/include/Specter/View.hpp @@ -0,0 +1,13 @@ +#ifndef SPECTER_VIEW_HPP +#define SPECTER_VIEW_HPP + +namespace Specter +{ + +class View +{ +}; + +} + +#endif // SPECTER_VIEW_HPP diff --git a/specter/lib/Button.cpp b/specter/lib/Button.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Control.cpp b/specter/lib/Control.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Menu.cpp b/specter/lib/Menu.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Node.cpp b/specter/lib/Node.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/NodeSocket.cpp b/specter/lib/NodeSocket.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/NumericField.cpp b/specter/lib/NumericField.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Outliner.cpp b/specter/lib/Outliner.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Panel.cpp b/specter/lib/Panel.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/RootView.cpp b/specter/lib/RootView.cpp new file mode 100644 index 000000000..db40a5655 --- /dev/null +++ b/specter/lib/RootView.cpp @@ -0,0 +1,3 @@ +#include "Specter/RootView.hpp" + + diff --git a/specter/lib/Space.cpp b/specter/lib/Space.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Specter.cpp b/specter/lib/Specter.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/Table.cpp b/specter/lib/Table.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/specter/lib/TextField.cpp b/specter/lib/TextField.cpp new file mode 100644 index 000000000..e69de29bb