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
95 lines
2.2 KiB
C++
95 lines
2.2 KiB
C++
#ifndef __GCONTAINER_H
|
|
#define __GCONTAINER_H
|
|
|
|
#include "gcontrol.h"
|
|
|
|
struct gContainerArrangement
|
|
{
|
|
unsigned mode : 8;
|
|
unsigned padding : 8;
|
|
unsigned spacing : 8;
|
|
unsigned locked : 1;
|
|
unsigned user : 1;
|
|
unsigned dirty : 1;
|
|
unsigned autoresize : 1;
|
|
unsigned margin : 1;
|
|
unsigned indent : 3;
|
|
};
|
|
|
|
class gContainer : public gControl
|
|
{
|
|
public:
|
|
gContainer();
|
|
gContainer(gContainer *parent);
|
|
~gContainer();
|
|
|
|
int arrange();
|
|
bool autoResize();
|
|
bool isUser() { return arrangement.user; }
|
|
int padding();
|
|
bool spacing();
|
|
bool margin();
|
|
int indent();
|
|
virtual int clientWidth();
|
|
virtual int clientHeight();
|
|
virtual int clientX();
|
|
virtual int clientY();
|
|
virtual int containerX();
|
|
virtual int containerY();
|
|
|
|
void setArrange(int vl);
|
|
void setUser(bool vl);
|
|
void setAutoResize(bool vl);
|
|
void setPadding(int vl);
|
|
void setSpacing(bool vl);
|
|
void setMargin(bool vl);
|
|
void setIndent(int vl);
|
|
|
|
virtual int childCount();
|
|
virtual gControl* child(int index);
|
|
gControl *find(int x, int y);
|
|
|
|
gContainerArrangement *getArrangement() { return &arrangement; }
|
|
gContainerArrangement fullArrangement() { return arrangement; }
|
|
void setFullArrangement(gContainerArrangement &arr) { arrangement = arr; performArrange(); }
|
|
|
|
virtual void performArrange();
|
|
|
|
virtual void setBackground(gColor color = COLOR_DEFAULT);
|
|
virtual void setForeground(gColor color = COLOR_DEFAULT);
|
|
virtual void setFont(gFont *ft);
|
|
|
|
virtual void resize(int w, int h);
|
|
|
|
virtual void setVisible(bool vl);
|
|
|
|
gContainer *proxy() { return _proxy ? _proxy : this; }
|
|
void setProxy(gContainer *proxy) { if (proxy != this) _proxy = proxy; else _proxy = 0; }
|
|
|
|
//"Signals"
|
|
void (*onArrange)(gContainer *sender);
|
|
void (*onBeforeArrange)(gContainer *sender);
|
|
//void (*onInsert)(gContainer *sender, gControl *child);
|
|
|
|
//"Private"
|
|
GtkWidget *radiogroup;
|
|
GList *ch_list;
|
|
int _client_w, _client_h;
|
|
|
|
virtual void insert(gControl *child, int x, int y) { insert(child); move(x, y); }
|
|
virtual void insert(gControl *child);
|
|
virtual void remove(gControl *child);
|
|
virtual GtkWidget *getContainer();
|
|
gControl *findFirstFocus();
|
|
void updateFocusChain();
|
|
|
|
static int _arrangement_level;
|
|
|
|
private:
|
|
void initialize();
|
|
gContainerArrangement arrangement;
|
|
gContainer *_proxy;
|
|
};
|
|
|
|
#endif
|