Laid the foundation for padding.
This commit is contained in:
parent
af6eb09bca
commit
ec95a4a2dd
4
uipriv.h
4
uipriv.h
|
@ -10,6 +10,10 @@ struct uiSize {
|
||||||
intmax_t height;
|
intmax_t height;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define uiSizingCommon \
|
||||||
|
intmax_t xPadding; \
|
||||||
|
intmax_t yPadding;
|
||||||
|
|
||||||
struct uiControl {
|
struct uiControl {
|
||||||
void (*destroy)(uiControl *);
|
void (*destroy)(uiControl *);
|
||||||
uintptr_t (*handle)(uiControl *);
|
uintptr_t (*handle)(uiControl *);
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
#define toNSString(str) [NSString stringWithUTF8String:(str)]
|
#define toNSString(str) [NSString stringWithUTF8String:(str)]
|
||||||
#define fromNSString(str) [(str) UTF8String]
|
#define fromNSString(str) [(str) UTF8String]
|
||||||
|
|
||||||
// TODO move this to the right place
|
|
||||||
struct uiSizing {
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO see if we can override alloc instead
|
// TODO see if we can override alloc instead
|
||||||
#ifdef uiLogAllocations
|
#ifdef uiLogAllocations
|
||||||
#import <stdio.h>
|
#import <stdio.h>
|
||||||
|
@ -36,6 +32,9 @@ struct uiSizing {
|
||||||
extern void setStandardControlFont(NSControl *);
|
extern void setStandardControlFont(NSControl *);
|
||||||
|
|
||||||
// container_darwin.m
|
// container_darwin.m
|
||||||
|
struct uiSizing {
|
||||||
|
uiSizingCommon
|
||||||
|
};
|
||||||
@interface uiContainer : NSView
|
@interface uiContainer : NSView
|
||||||
// TODO rename to uiChild
|
// TODO rename to uiChild
|
||||||
@property uiControl *child;
|
@property uiControl *child;
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
#include "uipriv.h"
|
#include "uipriv.h"
|
||||||
#include "ui_unix.h"
|
#include "ui_unix.h"
|
||||||
|
|
||||||
// TODO move this to the right place
|
|
||||||
struct uiSizing {
|
|
||||||
};
|
|
||||||
|
|
||||||
// container_unix.c
|
// container_unix.c
|
||||||
|
struct uiSizing {
|
||||||
|
uiSizingCommon
|
||||||
|
};
|
||||||
#define uiContainerType (uiContainer_get_type())
|
#define uiContainerType (uiContainer_get_type())
|
||||||
#define uiContainer(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), uiContainerType, uiContainer))
|
#define uiContainer(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), uiContainerType, uiContainer))
|
||||||
#define uiIsContainer(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), uiContainerType))
|
#define uiIsContainer(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), uiContainerType))
|
||||||
|
|
|
@ -55,6 +55,7 @@ extern WCHAR *windowText(HWND);
|
||||||
// container_windows.c
|
// container_windows.c
|
||||||
extern BOOL sharedWndProc(HWND, UINT, WPARAM, LPARAM, LRESULT *);
|
extern BOOL sharedWndProc(HWND, UINT, WPARAM, LPARAM, LRESULT *);
|
||||||
struct uiSizing {
|
struct uiSizing {
|
||||||
|
uiSizingCommon
|
||||||
int baseX;
|
int baseX;
|
||||||
int baseY;
|
int baseY;
|
||||||
LONG internalLeading;
|
LONG internalLeading;
|
||||||
|
|
Loading…
Reference in New Issue