2008-04-24 14:49:12 +02:00
|
|
|
/***************************************************************************
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
CPanel.cpp
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2018-02-12 02:53:46 +01:00
|
|
|
(c) 2000-2017 Benoît Minisini <g4mba5@gmail.com>
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#define __CPANEL_CPP
|
|
|
|
|
|
|
|
#include <qapplication.h>
|
|
|
|
#include <qobject.h>
|
|
|
|
|
|
|
|
#include "gambas.h"
|
|
|
|
|
|
|
|
#include "CConst.h"
|
|
|
|
#include "CPanel.h"
|
|
|
|
|
|
|
|
BEGIN_METHOD(CPANEL_new, GB_OBJECT parent)
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
MyContainer *wid = new MyContainer(QCONTAINER(VARG(parent)));
|
|
|
|
THIS->container = wid;
|
2009-06-08 00:10:14 +02:00
|
|
|
|
2009-06-11 23:33:17 +02:00
|
|
|
//THIS->widget.flag.fillBackground = true;
|
2012-01-24 18:46:35 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_METHOD(CHBOX_new, GB_OBJECT parent)
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
MyContainer *wid = new MyContainer(QCONTAINER(VARG(parent)));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
THIS->container = wid;
|
|
|
|
THIS->arrangement.mode = ARRANGE_HORIZONTAL;
|
|
|
|
//THIS->arrangement.autoresize = true;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_METHOD(CVBOX_new, GB_OBJECT parent)
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
MyContainer *wid = new MyContainer(QCONTAINER(VARG(parent)));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
THIS->container = wid;
|
|
|
|
THIS->arrangement.mode = ARRANGE_VERTICAL;
|
|
|
|
//THIS->arrangement.autoresize = true;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_METHOD(CHPANEL_new, GB_OBJECT parent)
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
MyContainer *wid = new MyContainer(QCONTAINER(VARG(parent)));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
THIS->container = wid;
|
|
|
|
THIS->arrangement.mode = ARRANGE_ROW;
|
|
|
|
//THIS->arrangement.autoresize = true;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_METHOD(CVPANEL_new, GB_OBJECT parent)
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
MyContainer *wid = new MyContainer(QCONTAINER(VARG(parent)));
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
THIS->container = wid;
|
|
|
|
THIS->arrangement.mode = ARRANGE_COLUMN;
|
|
|
|
//THIS->arrangement.autoresize = true;
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
CWIDGET_new(wid, (void *)_object);
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
END_METHOD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GB_DESC CPanelDesc[] =
|
|
|
|
{
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_DECLARE("Panel", sizeof(CPANEL)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_METHOD("_new", NULL, CPANEL_new, "(Parent)Container;"),
|
2021-01-28 02:46:00 +01:00
|
|
|
|
2012-02-12 17:24:59 +01:00
|
|
|
GB_PROPERTY("Border", "i", Container_Border),
|
2021-01-28 02:46:00 +01:00
|
|
|
|
|
|
|
ARRANGEMENT_PROPERTIES,
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
PANEL_DESCRIPTION,
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GB_DESC CHBoxDesc[] =
|
|
|
|
{
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_DECLARE("HBox", sizeof(CPANEL)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_METHOD("_new", NULL, CHBOX_new, "(Parent)Container;"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2021-01-28 02:46:00 +01:00
|
|
|
ARRANGEMENT_FLAG_PROPERTIES,
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
HBOX_DESCRIPTION,
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GB_DESC CVBoxDesc[] =
|
|
|
|
{
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_DECLARE("VBox", sizeof(CPANEL)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_METHOD("_new", NULL, CVBOX_new, "(Parent)Container;"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2021-01-28 02:46:00 +01:00
|
|
|
ARRANGEMENT_FLAG_PROPERTIES,
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
VBOX_DESCRIPTION,
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GB_DESC CHPanelDesc[] =
|
|
|
|
{
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_DECLARE("HPanel", sizeof(CPANEL)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_METHOD("_new", NULL, CHPANEL_new, "(Parent)Container;"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2021-01-28 02:46:00 +01:00
|
|
|
ARRANGEMENT_FLAG_PROPERTIES,
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
HPANEL_DESCRIPTION,
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GB_DESC CVPanelDesc[] =
|
|
|
|
{
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_DECLARE("VPanel", sizeof(CPANEL)), GB_INHERITS("Container"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_METHOD("_new", NULL, CVPANEL_new, "(Parent)Container;"),
|
2008-04-24 14:49:12 +02:00
|
|
|
|
2021-01-28 02:46:00 +01:00
|
|
|
ARRANGEMENT_FLAG_PROPERTIES,
|
2008-04-24 14:49:12 +02:00
|
|
|
|
|
|
|
VPANEL_DESCRIPTION,
|
|
|
|
|
2012-01-24 18:46:35 +01:00
|
|
|
GB_END_DECLARE
|
2008-04-24 14:49:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|