⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.h

📁 wyd server 753 development with c++ and codeblocks
💻 H
字号:
/* by My Destiny Team */

#ifndef __WX_GAMESERVER_MAIN__
#define __WX_GAMESERVER_MAIN__

#include <wx/wx.h>
#include <wx/menu.h>
#include <wx/frame.h>
#include <wx/utils.h>
#include <wx/timer.h>
#include <wx/msgdlg.h>
#include <wx/menuitem.h>
#include <wx/statusbr.h>
#include <wx/aboutdlg.h>
#include <wx/textctrl.h>

typedef enum __eLog {
    NORMAL,
    INFO,
    WARN
} eLog;

// Escreve o log na janela e no arquivo de log
void Log(eLog log, const char *str, ...);

// Escreve o log no status barvoid RefStatusBar();
class wxMain : public wxApp
{
public:
    wxMain();
    ~wxMain();

    virtual bool OnInit();
};

class wxGameServer : public wxFrame
{
public:
    wxGameServer();
    ~wxGameServer();
    // Fecha o aplicativo    void CloseApp();    // Inicia os processos do servidor    void Init();
    /* Event's */
    void OnGeneralTimer(wxCommandEvent& event);
    void OnSelectTimer(wxCommandEvent& event);
    void OnCloseMenuItemClick(wxCommandEvent& event);
    void OnAboutMenuItemClick(wxCommandEvent& event);

    /* ID's */
    static const long ID_WINDOW;
    static const long ID_LOG_TEXT;
    static const long ID_STATUS_BAR;
    static const long ID_SELECT_TIMER;
    static const long ID_GENERAL_TIMER;

    /* Menu ID's */
    static const long ID_FILE_ITEM_MENU;
    static const long ID_ABOUT_ITEM_MENU;

    wxTimer selTimer;
    wxTimer generalTimer;
    wxTextCtrl *logText;
    wxStatusBar *statusBar;

#ifdef WIN32
    WSADATA wsaData;
#endif

private:
    wxMenuBar *menuBar;
    wxMenu *srvMenu, *helpMenu;
    wxMenuItem *fileMenuItem, *aboutMenuItem;
};

// Info da janela
extern wxGameServer *GameServer;

#endif // __WX_GAMESERVER_MAIN__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -