win32 branch commit
This commit is contained in:
parent
3a0d3fd94e
commit
bbbeb0bebe
15 changed files with 1337 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2012, Jonathan Schleifer <js@webkeks.org>
|
||||
* Copyright (c) 2011, 2012, Dillon Aumiller <dillonaumiller@gmail.com>
|
||||
*
|
||||
* https://webkeks.org/hg/objgui/
|
||||
*
|
||||
|
@ -22,7 +23,24 @@
|
|||
|
||||
#import "OGWidget.h"
|
||||
|
||||
#ifdef OG_W32
|
||||
typedef struct s_OGBoxChild
|
||||
{
|
||||
HWND hwnd;
|
||||
BOOL expand;
|
||||
BOOL fill;
|
||||
int padding;
|
||||
int originalSize;
|
||||
float currentSize;
|
||||
struct s_OGBoxChild *next;
|
||||
} OGBoxChild;
|
||||
#endif
|
||||
|
||||
@interface OGBox: OGWidget
|
||||
#ifdef OG_W32
|
||||
{ OGBoxChild *firstBorn; }
|
||||
- (void)resizeChildren;
|
||||
#endif
|
||||
+ box;
|
||||
- (void)appendChild: (OGWidget*)child
|
||||
expand: (BOOL)expand
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2012, Jonathan Schleifer <js@webkeks.org>
|
||||
* Copyright (c) 2011, 2012, Dillon Aumiller <dillonaumiller@gmail.com>
|
||||
*
|
||||
* https://webkeks.org/hg/objgui/
|
||||
*
|
||||
|
@ -42,6 +43,12 @@
|
|||
id <OGComboBoxDataSource> dataSource;
|
||||
}
|
||||
|
||||
#ifdef OG_W32
|
||||
//unfortunately, the built-in Win32 ListBox stores a pointer to it's parent (for sending selection changed notifications) during CreateWindow().
|
||||
//it does not update it after a SetParent()... unless we implement a custom ListBox control i don't see a way around this...
|
||||
- initWithParent : (OGWidget *)parent;
|
||||
#endif
|
||||
|
||||
@property (assign) id <OGComboBoxDelegate> delegate;
|
||||
@property (assign) id <OGComboBoxDataSource> dataSource;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2012, Jonathan Schleifer <js@webkeks.org>
|
||||
* Copyright (c) 2011, 2012, Dillon Aumiller <dillonaumiller@gmail.com>
|
||||
*
|
||||
* https://webkeks.org/hg/objgui/
|
||||
*
|
||||
|
@ -21,7 +22,10 @@
|
|||
*/
|
||||
|
||||
#ifdef OG_GTK
|
||||
# include <gtk/gtk.h>
|
||||
#i nclude <gtk/gtk.h>
|
||||
#endif
|
||||
#ifdef OG_W32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#import <ObjFW/ObjFW.h>
|
||||
|
@ -32,10 +36,18 @@
|
|||
#ifdef OG_GTK
|
||||
GtkWidget *widget;
|
||||
#endif
|
||||
#ifdef OG_W32
|
||||
HWND widget;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)show;
|
||||
- (void)hide;
|
||||
@end
|
||||
|
||||
#ifdef OG_GTK
|
||||
extern void og_destroy(GtkWidget*, OGWidget*);
|
||||
#endif
|
||||
#ifdef OG_W32
|
||||
extern void og_destroy(HWND widget, OGWidget *object);
|
||||
#endif
|
||||
|
|
Reference in a new issue