cfd564e4a8
* NEW: Merge of the database manager CSV import dialog. * NEW: When editing a connection, the database charset can be ignored, i.e. string fields are assumed to be encoded in UTF-8. * BUG: Be read-only when editing a system table or a SQL request. * NEW: A new way of showing selected controls on forms. Maybe a little less easier, but faster anyway. * NEW: A new cool & useless animation on the welcome dialog. [GB.DB] * NEW: You can initialize a Connection object at creation by passing a "database URL" to the constructor. For example: "mysql://root@localhost/database" or "sqlite:///home/benoit/sqlite.db". This is not tested yet! * NEW: Connection.IgnoreCharset is a new boolean property. It just stores the value, and do nothing with it. It's up to you to use the information later if you need. [GB.DB.FORM] * NEW: DataView does not extract Blob value anymore. It just displays "BLOB" in the cell with a darker background. [GB.GTK] * NEW: Indent is new container boolean property. When set, an indentation of Desktop.Scale pixels is added to the layout. [GB.QT] * NEW: Indent is new container boolean property. When set, an indentation of Desktop.Scale pixels is added to the layout. [GB.QT4] * NEW: Indent is new container boolean property. When set, an indentation of Desktop.Scale pixels is added to the layout. [GB.QT4] * OPT: Some optimizations in the Editor for very long lines. Fix a bug in Qt that updated two lines when it was asked for one only. git-svn-id: svn://localhost/gambas/trunk@2128 867c0c6c-44f3-4631-809d-bfa615b0a4ec
204 lines
5 KiB
C++
204 lines
5 KiB
C++
/***************************************************************************
|
|
|
|
CFrame.cpp
|
|
|
|
(c) 2004-2006 - Daniel Campos Fernández <dcamposf@gmail.com>
|
|
|
|
GTK+ component
|
|
|
|
Realizado para la Junta de Extremadura.
|
|
Consejería de Educación Ciencia y Tecnología.
|
|
Proyecto gnuLinEx
|
|
|
|
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 1, or (at your option)
|
|
any later version.
|
|
|
|
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.
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
***************************************************************************/
|
|
|
|
#define __CFRAME_CPP
|
|
|
|
#include "CFrame.h"
|
|
|
|
|
|
BEGIN_METHOD(CFRAME_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gFrame(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
|
|
END_METHOD
|
|
|
|
|
|
BEGIN_METHOD(CPANEL_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gPanel(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
|
|
END_METHOD
|
|
|
|
|
|
BEGIN_METHOD(CHBOX_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gPanel(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
PANEL->setArrange(ARRANGE_HORIZONTAL);
|
|
//WIDGET->setAutoSize(true);
|
|
|
|
END_METHOD
|
|
|
|
|
|
BEGIN_METHOD(CVBOX_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gPanel(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
PANEL->setArrange(ARRANGE_VERTICAL);
|
|
//WIDGET->setAutoSize(true);
|
|
|
|
END_METHOD
|
|
|
|
|
|
BEGIN_METHOD(CHPANEL_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gPanel(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
PANEL->setArrange(ARRANGE_LEFT_RIGHT);
|
|
//WIDGET->setAutoSize(true);
|
|
|
|
END_METHOD
|
|
|
|
|
|
BEGIN_METHOD(CVPANEL_new, GB_OBJECT parent)
|
|
|
|
InitControl(new gPanel(CONTAINER(VARG(parent))), (CWIDGET*)THIS);
|
|
PANEL->setArrange(ARRANGE_TOP_BOTTOM);
|
|
//WIDGET->setAutoSize(true);
|
|
|
|
END_METHOD
|
|
|
|
BEGIN_PROPERTY(CPANEL_border)
|
|
|
|
if (READ_PROPERTY) { GB.ReturnInteger(PANEL->getBorder()); return; }
|
|
PANEL->setBorder(VPROP(GB_INTEGER));
|
|
|
|
END_PROPERTY
|
|
|
|
BEGIN_PROPERTY(CFRAME_text)
|
|
|
|
if (READ_PROPERTY) { GB.ReturnNewString( FRAME->text(),0 ); return; }
|
|
FRAME->setText(GB.ToZeroString(PROP(GB_STRING)));
|
|
|
|
END_PROPERTY
|
|
|
|
GB_DESC CFrameDesc[] =
|
|
{
|
|
GB_DECLARE("Frame", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CFRAME_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Caption", "s", CFRAME_text),
|
|
GB_PROPERTY("Text", "s", CFRAME_text),
|
|
GB_PROPERTY("Title", "s", CFRAME_text),
|
|
|
|
FRAME_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
GB_DESC CPanelDesc[] =
|
|
{
|
|
GB_DECLARE("Panel", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CPANEL_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Border", "i", CPANEL_border),
|
|
GB_PROPERTY("Arrangement", "i", CCONTAINER_arrangement),
|
|
GB_PROPERTY("AutoResize", "b", CCONTAINER_auto_resize),
|
|
GB_PROPERTY("Padding", "i", CCONTAINER_padding),
|
|
GB_PROPERTY("Spacing", "b", CCONTAINER_spacing),
|
|
GB_PROPERTY("Margin", "b", CCONTAINER_margin),
|
|
GB_PROPERTY("Indent", "b", CCONTAINER_indent),
|
|
|
|
PANEL_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
|
|
GB_DESC CHBoxDesc[] =
|
|
{
|
|
GB_DECLARE("HBox", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CHBOX_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Spacing", "b", CCONTAINER_spacing),
|
|
GB_PROPERTY("Margin", "b", CCONTAINER_margin),
|
|
GB_PROPERTY("Padding", "i", CCONTAINER_padding),
|
|
GB_PROPERTY("AutoResize", "b", CCONTAINER_auto_resize),
|
|
GB_PROPERTY("Indent", "b", CCONTAINER_indent),
|
|
|
|
HBOX_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
|
|
GB_DESC CVBoxDesc[] =
|
|
{
|
|
GB_DECLARE("VBox", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CVBOX_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Spacing", "b", CCONTAINER_spacing),
|
|
GB_PROPERTY("Margin", "b", CCONTAINER_margin),
|
|
GB_PROPERTY("Padding", "i", CCONTAINER_padding),
|
|
GB_PROPERTY("AutoResize", "b", CCONTAINER_auto_resize),
|
|
GB_PROPERTY("Indent", "b", CCONTAINER_indent),
|
|
|
|
VBOX_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
|
|
GB_DESC CHPanelDesc[] =
|
|
{
|
|
GB_DECLARE("HPanel", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CHPANEL_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Spacing", "b", CCONTAINER_spacing),
|
|
GB_PROPERTY("Margin", "b", CCONTAINER_margin),
|
|
GB_PROPERTY("Padding", "i", CCONTAINER_padding),
|
|
GB_PROPERTY("AutoResize", "b", CCONTAINER_auto_resize),
|
|
GB_PROPERTY("Indent", "b", CCONTAINER_indent),
|
|
|
|
HPANEL_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
|
|
GB_DESC CVPanelDesc[] =
|
|
{
|
|
GB_DECLARE("VPanel", sizeof(CFRAME)), GB_INHERITS("Container"),
|
|
|
|
GB_METHOD("_new", 0, CVPANEL_new, "(Parent)Container;"),
|
|
|
|
GB_PROPERTY("Spacing", "b", CCONTAINER_spacing),
|
|
GB_PROPERTY("Margin", "b", CCONTAINER_margin),
|
|
GB_PROPERTY("Padding", "i", CCONTAINER_padding),
|
|
GB_PROPERTY("AutoResize", "b", CCONTAINER_auto_resize),
|
|
GB_PROPERTY("Indent", "b", CCONTAINER_indent),
|
|
|
|
VPANEL_DESCRIPTION,
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|
|
|
|
|