2007-12-30 16:41:49 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
|
|
|
CContainer.h
|
|
|
|
|
|
|
|
(c) 2004-2006 - Daniel Campos Fernández <dcamposf@gmail.com>
|
|
|
|
|
|
|
|
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
|
2009-08-17 10:41:51 +00:00
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
2007-12-30 16:41:49 +00:00
|
|
|
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
|
2011-06-03 00:51:09 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __CCONTAINER_H
|
|
|
|
#define __CCONTAINER_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
#include "gambas.h"
|
|
|
|
#include "widgets.h"
|
|
|
|
#include "CWidget.h"
|
|
|
|
|
|
|
|
#ifndef __CCONTAINER_CPP
|
|
|
|
|
|
|
|
extern GB_DESC CChildrenDesc[];
|
|
|
|
extern GB_DESC CContainerDesc[];
|
|
|
|
extern GB_DESC CUserControlDesc[];
|
|
|
|
extern GB_DESC CUserContainerDesc[];
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define THIS ((CCONTAINER *)_object)
|
|
|
|
#define THIS_UC ((CUSERCONTROL *)_object)
|
2008-07-10 08:00:19 +00:00
|
|
|
#define WIDGET ((gContainer*)THIS->ob.widget)
|
|
|
|
#define PANEL ((gPanel *)(THIS->ob.widget))
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
#define THIS_CONT (THIS_UC->container)
|
2008-07-10 08:00:19 +00:00
|
|
|
#define WIDGET_CONT ((gContainer *)THIS_UC->container->ob.widget)
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
typedef
|
|
|
|
struct
|
|
|
|
{
|
2008-07-10 08:00:19 +00:00
|
|
|
CWIDGET ob;
|
2007-12-30 16:41:49 +00:00
|
|
|
}
|
|
|
|
CCONTAINER;
|
|
|
|
|
|
|
|
typedef
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
CWIDGET widget;
|
|
|
|
CCONTAINER *container;
|
|
|
|
gContainerArrangement save;
|
|
|
|
}
|
|
|
|
CUSERCONTROL;
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE_PROPERTY(CCONTAINER_arrangement);
|
|
|
|
DECLARE_PROPERTY(CCONTAINER_auto_resize);
|
|
|
|
DECLARE_PROPERTY(CCONTAINER_padding);
|
|
|
|
DECLARE_PROPERTY(CCONTAINER_spacing);
|
2009-01-04 01:37:20 +00:00
|
|
|
DECLARE_PROPERTY(CCONTAINER_margin);
|
2009-07-17 01:29:39 +00:00
|
|
|
DECLARE_PROPERTY(CCONTAINER_indent);
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
void CCONTAINER_cb_arrange(gContainer *sender);
|
2009-01-13 14:50:44 +00:00
|
|
|
void CCONTAINER_cb_before_arrange(gContainer *sender);
|
2007-12-30 16:41:49 +00:00
|
|
|
void CCONTAINER_raise_insert(CCONTAINER *_object, CWIDGET *child);
|
|
|
|
|
|
|
|
#endif
|