wxWidgets based Stable Diffusion C++ GUi
Ferenc Szontágh
2024-02-03 13e08c0eb131eefdd49ed024619c2a79a6040014
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
 
#pragma once
 
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/button.h>
#include <wx/string.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/stattext.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/statline.h>
#include <wx/dataview.h>
#include <wx/panel.h>
#include <wx/textctrl.h>
#include <wx/notebook.h>
#include <wx/statusbr.h>
#include <wx/frame.h>
#include <wx/filepicker.h>
#include <wx/checkbox.h>
#include <wx/statbmp.h>
 
///////////////////////////////////////////////////////////////////////////
 
 
///////////////////////////////////////////////////////////////////////////////
/// Class UI
///////////////////////////////////////////////////////////////////////////////
class UI : public wxFrame
{
    private:
 
    protected:
        wxPanel* m_all_panel;
        wxButton* m_settings;
        wxButton* m_refresh;
        wxStaticText* m_staticText160;
        wxChoice* m_model;
        wxStaticText* m_staticText161;
        wxChoice* m_vae;
        wxStaticText* m_staticText163;
        wxChoice* m_sampler;
        wxStaticText* m_staticText231;
        wxSpinCtrlDouble* m_cfg;
        wxStaticText* m_staticText233;
        wxSpinCtrl* m_seed;
        wxStaticText* m_staticText234;
        wxSpinCtrl* m_clip_skip;
        wxStaticText* m_staticText14;
        wxSpinCtrl* m_steps;
        wxStaticLine* m_staticLine236;
        wxStaticText* m_staticText237;
        wxSpinCtrl* m_width;
        wxStaticText* m_staticText239;
        wxSpinCtrl* m_height;
        wxButton* m_button7;
        wxNotebook* m_notebook1302;
        wxPanel* m_jobs_panel;
        wxButton* m_start_jobs;
        wxButton* m_pause_jobs;
        wxButton* m_delete_all_jobs;
        wxDataViewListCtrl* m_joblist;
        wxPanel* m_text2img_panel;
        wxTextCtrl* m_prompt;
        wxTextCtrl* m_neg_prompt;
        wxPanel* m_image2image_panel;
        wxPanel* m_models_panel;
        wxDataViewListCtrl* m_data_model_list;
        wxStaticLine* m_staticLine156;
        wxButton* m_generate;
        wxStaticText* m_staticText15;
        wxSpinCtrl* m_batch_count;
        wxStaticLine* m_staticline5;
        wxStaticText* m_staticText17;
        wxButton* m_save_preset;
        wxButton* m_load_preset;
        wxChoice* m_preset_list;
        wxButton* m_delete_preset;
        wxTextCtrl* logs;
        wxStatusBar* m_statusBar166;
 
        // Virtual event handlers, override them in your derived class
        virtual void onSettings( wxCommandEvent& event ) { event.Skip(); }
        virtual void onModelsRefresh( wxCommandEvent& event ) { event.Skip(); }
        virtual void onModelSelect( wxCommandEvent& event ) { event.Skip(); }
        virtual void onVaeSelect( wxCommandEvent& event ) { event.Skip(); }
        virtual void onSamplerSelect( wxCommandEvent& event ) { event.Skip(); }
        virtual void onResolutionSwap( wxCommandEvent& event ) { event.Skip(); }
        virtual void onJobsStart( wxCommandEvent& event ) { event.Skip(); }
        virtual void onJobsPause( wxCommandEvent& event ) { event.Skip(); }
        virtual void onJobsDelete( wxCommandEvent& event ) { event.Skip(); }
        virtual void onJoblistItemActivated( wxDataViewEvent& event ) { event.Skip(); }
        virtual void onJoblistSelectionChanged( wxDataViewEvent& event ) { event.Skip(); }
        virtual void onGenerate( wxCommandEvent& event ) { event.Skip(); }
        virtual void onSavePreset( wxCommandEvent& event ) { event.Skip(); }
        virtual void onLoadPreset( wxCommandEvent& event ) { event.Skip(); }
        virtual void onSelectPreset( wxCommandEvent& event ) { event.Skip(); }
        virtual void onDeletePreset( wxCommandEvent& event ) { event.Skip(); }
 
 
    public:
 
        UI( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("sd.cpp.gui"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxCAPTION|wxCLOSE_BOX|wxICONIZE|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxBORDER_THEME|wxCLIP_CHILDREN );
 
        ~UI();
 
};
 
///////////////////////////////////////////////////////////////////////////////
/// Class Settings
///////////////////////////////////////////////////////////////////////////////
class Settings : public wxFrame
{
    private:
 
    protected:
        wxNotebook* m_notebook1696;
        wxPanel* m_path_panel;
        wxStaticText* m_staticText172410;
        wxDirPickerCtrl* m_model_dir;
        wxStaticText* m_staticText18013;
        wxDirPickerCtrl* m_vae_dir;
        wxStaticText* m_staticText1801317202731;
        wxDirPickerCtrl* m_embedding_dir;
        wxStaticText* m_staticText18013172027;
        wxDirPickerCtrl* m_lora_dir;
        wxStaticText* m_staticText19;
        wxDirPickerCtrl* m_presets_dir;
        wxStaticLine* m_staticLine223;
        wxStaticText* m_staticText180131720;
        wxDirPickerCtrl* m_images_output;
        wxPanel* m_settings;
        wxCheckBox* m_keep_model_in_memory;
        wxCheckBox* m_save_all_image;
        wxStaticText* m_staticText16;
        wxChoice* m_choice4;
        wxButton* m_save;
 
        // Virtual event handlers, override them in your derived class
        virtual void onSave( wxCommandEvent& event ) { event.Skip(); }
 
 
    public:
 
        Settings( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT|wxCAPTION|wxCLOSE_BOX|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_THEME );
 
        ~Settings();
 
};
 
///////////////////////////////////////////////////////////////////////////////
/// Class ImageViewer
///////////////////////////////////////////////////////////////////////////////
class ImageViewer : public wxFrame
{
    private:
 
    protected:
 
    public:
        wxStaticBitmap* m_bitmap;
        wxTextCtrl* m_textCtrl4;
 
        ImageViewer( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
 
        ~ImageViewer();
 
};