From e38a6a53efbf23597b3296d1f40a1ea39e4b9ef5 Mon Sep 17 00:00:00 2001 From: Oscar Lesta Date: Sat, 9 Sep 2023 14:13:29 -0300 Subject: [PATCH] Add stubbed-out versions of missing source files. Should at least compile/link cleanly now (on 32bits, GCC2). Both TraX and FastTraX seem functional (except the Settings window). --- Common/UI/Globals.h | 10 ++++++++++ Common/UI/Joins.h | 17 +++++++++++++++++ Common/UI/ResultsHandler.cpp | 34 ++++++++++++++++++++++++++++++++++ Common/UI/ResultsHandler.h | 20 ++++++++++++++++++++ Common/UI/Settings.cpp | 5 +++++ Common/UI/Settings.h | 23 +++++++++++++++++++++++ Common/UI/SettingsWindow.cpp | 10 ++++++++++ Common/UI/SettingsWindow.h | 25 +++++++++++++++++++++++++ 8 files changed, 144 insertions(+) create mode 100644 Common/UI/Globals.h create mode 100644 Common/UI/Joins.h create mode 100644 Common/UI/ResultsHandler.cpp create mode 100644 Common/UI/ResultsHandler.h create mode 100644 Common/UI/Settings.cpp create mode 100644 Common/UI/Settings.h create mode 100644 Common/UI/SettingsWindow.cpp create mode 100644 Common/UI/SettingsWindow.h diff --git a/Common/UI/Globals.h b/Common/UI/Globals.h new file mode 100644 index 0000000..517f88b --- /dev/null +++ b/Common/UI/Globals.h @@ -0,0 +1,10 @@ +// Stubbed out Globals.h for Tim Vernum's TraX. + +#ifndef GLOBALS_H +#define GLOBALS_H + +#include "ResultsHandler.h" + +static ResultsHandler gResults; + +#endif diff --git a/Common/UI/Joins.h b/Common/UI/Joins.h new file mode 100644 index 0000000..3ae5d8d --- /dev/null +++ b/Common/UI/Joins.h @@ -0,0 +1,17 @@ +// Stubbed out Joins.h for Tim Vernum's TraX. + +#ifndef JOINS_H +#define JOINS_H + +static const char* const kOpenStrings[] = { "", "(" }; +static const char* const kCloseStrings[] = { "", ")" }; +static const char* const kNotStrings[] = { "", "not" }; +static const char* const kConjunctionStrings[] = { "", "and" }; + +// Fixme: these are just wild guesses for now: +static const char* const kOpenValues[] = { "", "(" }; +static const char* const kCloseValues[] = { "", ")" }; +static const char* const kNotValues[] = { "", "!" }; +static const char* const kConjunctionValues[] = { "", "&&" }; + +#endif diff --git a/Common/UI/ResultsHandler.cpp b/Common/UI/ResultsHandler.cpp new file mode 100644 index 0000000..e0d8939 --- /dev/null +++ b/Common/UI/ResultsHandler.cpp @@ -0,0 +1,34 @@ +// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. + +#include "ResultsHandler.h" +#include "ResultsWindow.h" + + +ResultsHandler::ResultsHandler() +{ +} + + +void +ResultsHandler::Init() +{ +} + + +int +ResultsHandler::AddResult(const char* foobar) +{ + return ResultsWindow::AddResult(foobar); +} + + +void +ResultsHandler::NewSearch() +{ +} + + +void +ResultsHandler::EndSearch() +{ +} diff --git a/Common/UI/ResultsHandler.h b/Common/UI/ResultsHandler.h new file mode 100644 index 0000000..15bbcfe --- /dev/null +++ b/Common/UI/ResultsHandler.h @@ -0,0 +1,20 @@ +// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. + +#ifndef RESULTSHANDLER_H +#define RESULTSHANDLER_H + + +class ResultsHandler { +public: + ResultsHandler(); + + void Init(); + + void NewSearch(); + void EndSearch(); + + static int AddResult(const char*); +}; + + +#endif diff --git a/Common/UI/Settings.cpp b/Common/UI/Settings.cpp new file mode 100644 index 0000000..80b6920 --- /dev/null +++ b/Common/UI/Settings.cpp @@ -0,0 +1,5 @@ +// Stubbed out Settings.cpp for Tim Vernum's TraX. + +#include "Settings.h" + +TraxSettings gSettings; diff --git a/Common/UI/Settings.h b/Common/UI/Settings.h new file mode 100644 index 0000000..8554190 --- /dev/null +++ b/Common/UI/Settings.h @@ -0,0 +1,23 @@ +// Stubbed out Settings.h for Tim Vernum's TraX. + +#ifndef SETTINGS_H +#define SETTINGS_H + + +typedef struct settings { + enum { + eShowBrackets, + eShowJoinPanel, + eShowNot + }; + + int fConjunction; + const char* fDefaultFolder; + bool fUseTracker; + int fShow; +} TraxSettings; + + +extern TraxSettings gSettings; + +#endif diff --git a/Common/UI/SettingsWindow.cpp b/Common/UI/SettingsWindow.cpp new file mode 100644 index 0000000..19572f2 --- /dev/null +++ b/Common/UI/SettingsWindow.cpp @@ -0,0 +1,10 @@ +// Stubbed out SettingsWindow.{h,cpp} for Tim Vernum's TraX. + +#include "SettingsWindow.h" + + +SettingsWindow::SettingsWindow() + : BWindow(BRect( 100, 100, 400, 250 ) , "Settings", B_DOCUMENT_WINDOW, B_NOT_CLOSABLE | B_NOT_RESIZABLE) +{ + +} diff --git a/Common/UI/SettingsWindow.h b/Common/UI/SettingsWindow.h new file mode 100644 index 0000000..e6be427 --- /dev/null +++ b/Common/UI/SettingsWindow.h @@ -0,0 +1,25 @@ +// Stubbed out SettingsWindow.{h,cpp} for Tim Vernum's TraX. + +#ifndef SETTINGSWINDOW_H +#define SETTINGSWINDOW_H + +#include + + +class SettingsWindow : public BWindow +{ + public: + SettingsWindow(); + +// These methods are present in the TraX BeOS binaries: +// void LoadSettings(); +// void SaveSettings(); + +// void GetSettings(FastTraxSetting*); +// void DefaultSettings(); + +// void BroadcaseSettings(); +// virtual void MessageReceived(BMessage* msg); +}; + +#endif