Laid the foundation for padding.

This commit is contained in:
Pietro Gagliardi 2015-04-09 15:25:18 -04:00
parent af6eb09bca
commit ec95a4a2dd
4 changed files with 11 additions and 8 deletions

View File

@ -10,6 +10,10 @@ struct uiSize {
intmax_t height;
};
#define uiSizingCommon \
intmax_t xPadding; \
intmax_t yPadding;
struct uiControl {
void (*destroy)(uiControl *);
uintptr_t (*handle)(uiControl *);

View File

@ -8,10 +8,6 @@
#define toNSString(str) [NSString stringWithUTF8String:(str)]
#define fromNSString(str) [(str) UTF8String]
// TODO move this to the right place
struct uiSizing {
};
// TODO see if we can override alloc instead
#ifdef uiLogAllocations
#import <stdio.h>
@ -36,6 +32,9 @@ struct uiSizing {
extern void setStandardControlFont(NSControl *);
// container_darwin.m
struct uiSizing {
uiSizingCommon
};
@interface uiContainer : NSView
// TODO rename to uiChild
@property uiControl *child;

View File

@ -7,11 +7,10 @@
#include "uipriv.h"
#include "ui_unix.h"
// TODO move this to the right place
struct uiSizing {
};
// container_unix.c
struct uiSizing {
uiSizingCommon
};
#define uiContainerType (uiContainer_get_type())
#define uiContainer(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), uiContainerType, uiContainer))
#define uiIsContainer(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), uiContainerType))

View File

@ -55,6 +55,7 @@ extern WCHAR *windowText(HWND);
// container_windows.c
extern BOOL sharedWndProc(HWND, UINT, WPARAM, LPARAM, LRESULT *);
struct uiSizing {
uiSizingCommon
int baseX;
int baseY;
LONG internalLeading;