2021-12-05 18:39:33 +08:00
|
|
|
#include "MyWin.hh"
|
|
|
|
|
2021-12-24 23:28:46 +08:00
|
|
|
MyWin::MyWin()
|
|
|
|
:main_box(Gtk::ORIENTATION_VERTICAL,5),
|
2021-12-26 00:05:54 +08:00
|
|
|
btnbox(Gtk::ORIENTATION_HORIZONTAL,5),
|
|
|
|
btnopen("Open Image")
|
2021-12-24 23:28:46 +08:00
|
|
|
{
|
|
|
|
//Add Widgets
|
|
|
|
set_default_size(800,450);
|
|
|
|
set_icon_name("org.gtk.daleclack");
|
2021-12-05 18:39:33 +08:00
|
|
|
|
2021-12-24 23:28:46 +08:00
|
|
|
//Scrolled Window
|
|
|
|
sw.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
|
|
|
|
sw.add(image_area);
|
|
|
|
main_box.pack_start(sw);
|
|
|
|
|
2021-12-26 00:05:54 +08:00
|
|
|
//Initalize Scale
|
|
|
|
m_adjustment = Gtk::Adjustment::create(1.0,0.1,10.0,0.1,0.1);
|
|
|
|
scale.set_default_direction(Gtk::TEXT_DIR_LTR);
|
|
|
|
scale.set_adjustment(m_adjustment);
|
|
|
|
|
|
|
|
//Add control widgets
|
|
|
|
btnbox.pack_start(scale);
|
|
|
|
btnbox.pack_start(btnopen,Gtk::PACK_SHRINK);
|
2021-12-24 23:28:46 +08:00
|
|
|
main_box.pack_start(btnbox,Gtk::PACK_SHRINK);
|
2021-12-26 00:05:54 +08:00
|
|
|
btnopen.signal_clicked().connect(sigc::mem_fun(*this,&MyWin::btnopen_clicked));
|
2021-12-24 23:28:46 +08:00
|
|
|
|
|
|
|
add(main_box);
|
|
|
|
show_all_children();
|
2021-12-26 00:05:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void MyWin::btnopen_clicked(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void MyWin::dialog_response(int response_id){
|
|
|
|
|
|
|
|
}
|