#include <set>
+#include <uilib/uilib.h>
struct PressedKeys
{
GtkAccelGroup* global_accel = 0;
void global_accel_init(){
- global_accel = gtk_accel_group_new();
+ global_accel = ui::AccelGroup();
}
void global_accel_destroy(){
gtk_window_deiconify( parentWindow );
}
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
GtkVBox* vbox = create_dialog_vbox( 8, 8 );
return g_signal_connect(G_OBJECT(*this), "key-press-event", (GCallback) +func, &pass);
}
+ AccelGroup::AccelGroup() : AccelGroup(GTK_ACCEL_GROUP(gtk_accel_group_new()))
+ { }
+
Adjustment::Adjustment(double value,
double lower, double upper,
double step_increment, double page_increment,
#include <string>
+using ui_accelgroup = struct _GtkAccelGroup;
using ui_adjustment = struct _GtkAdjustment;
using ui_alignment = struct _GtkAlignment;
using ui_box = struct _GtkBox;
class Object : public Convertible<Object, ui_object, false> {
public:
+ using native = ui_object;
void *_handle;
Object(void *h) : _handle(h)
}; \
static_assert(sizeof(name) == sizeof(super), "object slicing")
+ WRAP(AccelGroup, Object, ui_accelgroup,
+ AccelGroup();
+ );
+
WRAP(Adjustment, Widget, ui_adjustment,
Adjustment(double value,
double lower, double upper,
Button(const char *label);
);
- WRAP(CellRenderer, Widget, ui_cellrenderer,);
+ WRAP(CellRenderer, Object, ui_cellrenderer,);
WRAP(CellRendererText, CellRenderer, ui_cellrenderertext,
CellRendererText();
return accelerator_window_key_press(widget, event, dialogptr);
}, &dialog);
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
GtkHBox* hbox = create_dialog_hbox( 4, 4 );
ui::Window window = MainFrame_getWindow().create_dialog_window("Arbitrary sides", G_CALLBACK(dialog_delete_callback ), &dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Patch texture layout", dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Light intensity", dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
ui::Window window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
ui::Window window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
ui::Window window = MainFrame_getWindow().create_dialog_window("Find Brush", G_CALLBACK(dialog_delete_callback ), &dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
ui::Window window = MainFrame_getWindow().create_dialog_window("Patch density", G_CALLBACK(dialog_delete_callback ), &dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
ui::Window window = MainFrame_getWindow().create_modal_dialog_window( "Cap", dialog );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
if ( !g_rotate_dialog.window ) {
g_rotate_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary rotation", G_CALLBACK(rotatedlg_delete ), &g_rotate_dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( g_rotate_dialog.window, accel );
{
if ( !g_scale_dialog.window ) {
g_scale_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary scale", G_CALLBACK(scaledlg_delete ), &g_scale_dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( g_scale_dialog.window, accel );
{