Skip to content

Commit

Permalink
[add] 清空按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
iMMIQ committed Aug 23, 2022
1 parent c6ce7c9 commit 5a0189b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
8 changes: 7 additions & 1 deletion default_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ DefaultWindow::DefaultWindow() {

auto DefaultWindow::on_open_file_button_clicked() -> void {}

auto DefaultWindow::on_clear_button_clicked() -> void {}
auto DefaultWindow::on_clear_button_clicked() -> void {
Glib::RefPtr<Gtk::TextBuffer> void_buffer;
code_text->set_buffer(void_buffer);
IR_text->set_buffer(void_buffer);
asm_text->set_buffer(void_buffer);
result_text->set_buffer(void_buffer);
}

auto DefaultWindow::on_run_button_clicked() -> void {}
16 changes: 8 additions & 8 deletions default_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

class DefaultWindow : public Gtk::Window {
private:
Gtk::Box *box;
Gtk::TextView *code_text;
Gtk::TextView *IR_text;
Gtk::TextView *asm_text;
Gtk::TextView *result_text;
Gtk::Button *open_file_button;
Gtk::Button *clear_button;
Gtk::Button *run_button;
Gtk::Box *box{};
Gtk::TextView *code_text{};
Gtk::TextView *IR_text{};
Gtk::TextView *asm_text{};
Gtk::TextView *result_text{};
Gtk::Button *open_file_button{};
Gtk::Button *clear_button{};
Gtk::Button *run_button{};

public:
DefaultWindow();
Expand Down

0 comments on commit 5a0189b

Please sign in to comment.