App namespace should be duck, not mc. That's for the lib.
This commit is contained in:
parent
9aa2ceeb90
commit
2be3823442
9 changed files with 19 additions and 18 deletions
|
@ -20,7 +20,7 @@
|
||||||
#include "app_config.h"
|
#include "app_config.h"
|
||||||
#include <cxxopts.hpp>
|
#include <cxxopts.hpp>
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
CommandLineResult::CommandLineResult() :
|
CommandLineResult::CommandLineResult() :
|
||||||
should_quit(false)
|
should_quit(false)
|
||||||
{
|
{
|
||||||
|
@ -54,4 +54,4 @@ CommandLineResult parse_command_line (int argc, char* argv[]) {
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
struct CommandLineResult {
|
struct CommandLineResult {
|
||||||
CommandLineResult();
|
CommandLineResult();
|
||||||
|
|
||||||
|
@ -25,4 +25,4 @@ namespace mc {
|
||||||
};
|
};
|
||||||
|
|
||||||
CommandLineResult parse_command_line (int argc, char* argv[]);
|
CommandLineResult parse_command_line (int argc, char* argv[]);
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -31,11 +31,11 @@ int main(int argc, char* argv[]) {
|
||||||
std::cout << "Starting program\n";
|
std::cout << "Starting program\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto command = mc::parse_command_line(argc, argv);
|
auto command = duck::parse_command_line(argc, argv);
|
||||||
if (command.should_quit)
|
if (command.should_quit)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const int retval = mc::run_gui(g_def_icon_size, g_def_icon_fps);
|
const int retval = duck::run_gui(g_def_icon_size, g_def_icon_fps);
|
||||||
|
|
||||||
#if !defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
std::cout << "Leaving program with return code " << retval << '\n';
|
std::cout << "Leaving program with return code " << retval << '\n';
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
MainWindow::MainWindow (int icon_size, int icon_fps, const std::string& caption) :
|
MainWindow::MainWindow (int icon_size, int icon_fps, const std::string& caption) :
|
||||||
m_grid1(*this, 3, true),
|
m_grid1(*this, 3, true),
|
||||||
m_grid2(*this, 3, true),
|
m_grid2(*this, 3, true),
|
||||||
|
@ -61,4 +61,4 @@ void MainWindow::init_menu() {
|
||||||
win.modality();
|
win.modality();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
#include <nana/gui/widgets/menubar.hpp>
|
#include <nana/gui/widgets/menubar.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
|
|
||||||
class MainWindow : public nana::form {
|
class MainWindow : public nana::form {
|
||||||
public:
|
public:
|
||||||
MainWindow (int icon_size, int icon_fps, const std::string& caption);
|
MainWindow (int icon_size, int icon_fps, const std::string& caption);
|
||||||
|
@ -23,4 +24,4 @@ private:
|
||||||
int m_icon_size;
|
int m_icon_size;
|
||||||
int m_icon_fps;
|
int m_icon_fps;
|
||||||
};
|
};
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "main_window.hpp"
|
#include "main_window.hpp"
|
||||||
#include "app_config.h"
|
#include "app_config.h"
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
int run_gui(int icon_size, int icon_fps) {
|
int run_gui(int icon_size, int icon_fps) {
|
||||||
MainWindow win(icon_size, icon_fps, APP_NAME);
|
MainWindow win(icon_size, icon_fps, APP_NAME);
|
||||||
win.show();
|
win.show();
|
||||||
|
@ -10,4 +10,4 @@ int run_gui(int icon_size, int icon_fps) {
|
||||||
nana::exec();
|
nana::exec();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
int run_gui(int icon_size, int icon_fps);
|
int run_gui(int icon_size, int icon_fps);
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "git_version.h"
|
#include "git_version.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
namespace {
|
namespace {
|
||||||
const constexpr char g_gpl_text[] =
|
const constexpr char g_gpl_text[] =
|
||||||
APP_SHORT_DESC "\n"
|
APP_SHORT_DESC "\n"
|
||||||
|
@ -70,4 +70,4 @@ VersionWindow::VersionWindow(nana::window owner) :
|
||||||
this->collocate();
|
this->collocate();
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <nana/gui/widgets/label.hpp>
|
#include <nana/gui/widgets/label.hpp>
|
||||||
#include <nana/gui/widgets/textbox.hpp>
|
#include <nana/gui/widgets/textbox.hpp>
|
||||||
|
|
||||||
namespace mc {
|
namespace duck {
|
||||||
class VersionWindow : public nana::form {
|
class VersionWindow : public nana::form {
|
||||||
public:
|
public:
|
||||||
VersionWindow(nana::window owner);
|
VersionWindow(nana::window owner);
|
||||||
|
@ -20,4 +20,4 @@ private:
|
||||||
nana::textbox m_main_text;
|
nana::textbox m_main_text;
|
||||||
nana::button m_close;
|
nana::button m_close;
|
||||||
};
|
};
|
||||||
} //namespace mc
|
} //namespace duck
|
||||||
|
|
Loading…
Add table
Reference in a new issue