void QAbstractConfigurableTileWidget::mouseReleaseEvent(QMouseEvent * event) {
   if (isResizing) {
     sl_resize(QSize(event->pos().x(), defaultWidgetSize.height()));
     isResizing = false;
     emit sig_resize(QSize(event->pos().x(), defaultWidgetSize.height()));
   }
 }
void CL_DisplayWindow_OpenGL::set_size(int width, int height)
{
	fullscreen_width = width;
	fullscreen_height = height;
	SizeWindow(window_ref, width, height, true);
	sig_resize(width, height);
}
Example #3
0
Window::Window(const CL_Rect& rect, const std::string& title, CL_Component* parent)
  : CL_Component(rect, parent), impl(new WindowImpl())
{
  impl->titlebar = new Titlebar(CL_Rect(CL_Point(3+16,3), 
                                        CL_Size(get_width()-6-18-18-18, 12+3)), title,
                                this);
  //Fonts::verdana11.draw(8+15, 3, title);

  impl->close = new Icon(CL_Rect(CL_Point(3, 3), CL_Size(18,18)), 
                         make_sprite(datadir + "/images/window/close.png"),
                         "", this);
  impl->minimize = new Icon(CL_Rect(CL_Point(get_width()-3-18-18, 3), CL_Size(18,18)), 
                            make_sprite(datadir + "/images/window/minimize.png"),
                            "", this);
  impl->maximize = new Icon(CL_Rect(CL_Point(get_width()-3-18, 3), CL_Size(18,18)), 
                            make_sprite(datadir + "/images/window/maximize.png"),
                            "", this);

  impl->client_area = new CL_Component(CL_Rect(CL_Point(4, 3+12+7), 
                                               CL_Size(rect.get_width()-10,
                                                       rect.get_height()-28)), this);
  impl->parent  = this;
  impl->is_maximized = false;

  impl->slots.push_back(sig_resize().connect(impl.get(),      &WindowImpl::on_resize));

  impl->slots.push_back(sig_paint().connect(impl.get(),      &WindowImpl::draw));
  impl->slots.push_back(impl->maximize->sig_clicked().connect(impl.get(), &WindowImpl::do_maximize));
  impl->slots.push_back(impl->close->sig_clicked().connect(impl.get(), &WindowImpl::do_close));
}