first commit, base client with gtk3
This commit is contained in:
37
vista.cpp
Normal file
37
vista.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "vista.h"
|
||||
#include <iostream>
|
||||
|
||||
vista::vista():m_button("send"),m_VBox(Gtk::ORIENTATION_VERTICAL)
|
||||
{
|
||||
set_title("remote instaler");
|
||||
set_border_width(5);
|
||||
|
||||
add(m_VBox);
|
||||
m_ScrolledWindow.add(m_TextView);
|
||||
m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
m_VBox.pack_start(m_ScrolledWindow);
|
||||
|
||||
//Add buttons:
|
||||
m_VBox.pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
|
||||
m_ButtonBox.pack_start(m_button, Gtk::PACK_SHRINK);
|
||||
m_ButtonBox.set_border_width(5);
|
||||
m_ButtonBox.set_spacing(5);
|
||||
m_ButtonBox.set_layout(Gtk::BUTTONBOX_END);
|
||||
|
||||
// When the button receives the "clicked" signal, it will call the
|
||||
// on_button_clicked() method defined below.
|
||||
/*m_button.signal_clicked().connect(sigc::mem_fun(*this,
|
||||
&vista::on_button_clicked));*/
|
||||
|
||||
m_refTextBuffer1 = Gtk::TextBuffer::create();
|
||||
//m_refTextBuffer1->set_text("This is the text from TextBuffer #1.");
|
||||
m_TextView.set_buffer(m_refTextBuffer1);
|
||||
// The final step is to display this newly created widget...
|
||||
show_all_children();
|
||||
}
|
||||
|
||||
/*void vista::on_button_clicked(){
|
||||
std::string salida = m_refTextBuffer1->get_text();
|
||||
std::cout << salida << std::endl;
|
||||
}*/
|
||||
Reference in New Issue
Block a user