93 lines
2.3 KiB
C++
93 lines
2.3 KiB
C++
/*
|
|
speciesgen
|
|
Copyright (C) 2022-2023 prisixia
|
|
|
|
This file is part of speciesgen.
|
|
|
|
speciesgen is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
speciesgen is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: main_panel.cpp
|
|
// Purpose: Main panel, part of the GUI
|
|
// Author: prisixia
|
|
// Created: 2023-04-27
|
|
// Copyright: (C) 2022-2023 prisixia
|
|
// Licence: GNU General Public License version 3
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef SPECIESGEN_PANEL_MAIN_H
|
|
#define SPECIESGEN_PANEL_MAIN_H
|
|
|
|
#include <wx/wxprec.h>
|
|
|
|
#ifndef WX_PRECOMP
|
|
#include <wx/wx.h>
|
|
#endif // WX_PRECOMP
|
|
|
|
#if wxUSE_CLIPBOARD
|
|
#include <wx/clipbrd.h>
|
|
#include <wx/dataobj.h>
|
|
#endif // wxUSE_CLIPBOARD
|
|
|
|
#include <wx/dir.h>
|
|
#include <wx/stdpaths.h>
|
|
|
|
#include "error.h"
|
|
|
|
namespace SpeciesGen {
|
|
enum {
|
|
MOD_GENERATE,
|
|
|
|
DIR_CHOOSE
|
|
};
|
|
|
|
class MainPanel : public wxPanel, public ErrorHandler {
|
|
public:
|
|
MainPanel(wxWindow *, int, int, int, int, const std::string &);
|
|
|
|
#if wxUSE_CLIPBOARD
|
|
// bool HasSelection() const;
|
|
// void DoPasteFromClipboard();
|
|
// void DoCopyToClipboard();
|
|
#endif // wxUSE_CLIPBOARD
|
|
|
|
#if wxUSE_DIRDLG
|
|
void DoChooseDir(wxCommandEvent &WXUNUSED(event));
|
|
#endif // wxUSE_DIRDLG
|
|
|
|
virtual size_t CheckForErrors();
|
|
wxTextCtrl *m_author;
|
|
wxTextCtrl *m_name;
|
|
wxTextCtrl *m_friendlyName;
|
|
wxTextCtrl *m_modDestination;
|
|
wxButton *m_generate;
|
|
|
|
private:
|
|
#if wxUSE_CLIPBOARD
|
|
// wxTextCtrl *GetFocusedText() const;
|
|
#endif // wxUSE_CLIPBOARD
|
|
|
|
wxButton *m_browse;
|
|
wxStaticText *m_modDestinationText;
|
|
wxStaticText *m_authorText;
|
|
wxStaticText *m_nameText;
|
|
wxStaticText *m_friendlyNameText;
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
};
|
|
} // namespace SpeciesGen
|
|
|
|
#endif // SPECIESGEN_PANEL_MAIN_H
|