Xe-Release/XeRelease_Gtkmm3/src/MyDialog.hh

49 lines
1.1 KiB
C++
Raw Normal View History

2021-06-23 21:03:44 +08:00
#pragma once
#include <gtkmm.h>
2021-09-20 10:46:08 +08:00
#include <fstream>
#include "../cfgfile2/cfgfile.hh"
2021-06-23 21:03:44 +08:00
class MyDialog : public Gtk::Dialog{
2021-06-23 22:26:32 +08:00
public:
2021-09-20 10:46:08 +08:00
MyDialog(BaseObjectType* cobject,const Glib::RefPtr<Gtk::Builder>& ref_builder);
static MyDialog * create(Gtk::Window& parent);
2021-06-23 22:26:32 +08:00
protected:
void on_response(int response_id) override;
private:
2021-09-20 10:46:08 +08:00
Glib::RefPtr<Gtk::Builder> ref_Glade;
2021-12-31 22:49:10 +08:00
//Child widgets
Gtk::Entry * entry_lts,* entry_stable,* entry_dev,* entry_path;
Gtk::Button * btnpath;
//Strings to store path on Windows and Unix-Like systems
std::string config_win32,config_unix;
//Signal Handlers
Glib::RefPtr<Gtk::FileChooserNative> dialog;
void btnpath_clicked();
void dialog_response(int response_id);
2021-06-23 21:03:44 +08:00
};
class MsgBox : public Gtk::Dialog{
public:
MsgBox(Gtk::Window &parent);
void Init(Glib::ustring msg);
protected:
//Signal Handler
void on_response(int response_id) override;
private:
//Child Widgets
Gtk::Image image;
Gtk::Label msg_label;
Gtk::Box *vbox,hbox;
};
2021-12-31 22:49:10 +08:00
static inline bool unix_file_system_detected(){
#ifdef _WIN32
return false;
#else
return true;
#endif
}