More TODO resolution and LONGTERM relegation.
This commit is contained in:
parent
a0084df23a
commit
6e94671782
|
@ -5,9 +5,9 @@
|
||||||
// This is documented on the NSMatrix page, but the rest of the OS X documentation says to still use NSMatrix.
|
// This is documented on the NSMatrix page, but the rest of the OS X documentation says to still use NSMatrix.
|
||||||
// NSMatrix has weird quirks anyway...
|
// NSMatrix has weird quirks anyway...
|
||||||
|
|
||||||
// TODO
|
// TODO check that multiple radio buttons on the same parent container work right
|
||||||
// - check that multiple radio buttons on the same parent container work right
|
|
||||||
// - 6 units of spacing between buttons, as suggested by Interface Builder?
|
// LONGTERM 6 units of spacing between buttons, as suggested by Interface Builder?
|
||||||
|
|
||||||
struct uiRadioButtons {
|
struct uiRadioButtons {
|
||||||
uiDarwinControl c;
|
uiDarwinControl c;
|
||||||
|
@ -48,11 +48,12 @@ void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
|
||||||
NSButton *b, *b2;
|
NSButton *b, *b2;
|
||||||
NSLayoutConstraint *constraint;
|
NSLayoutConstraint *constraint;
|
||||||
|
|
||||||
// TODO bezel style? transparent?
|
|
||||||
b = [[NSButton alloc] initWithFrame:NSZeroRect];
|
b = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||||
[b setTitle:toNSString(text)];
|
[b setTitle:toNSString(text)];
|
||||||
[b setButtonType:NSRadioButton];
|
[b setButtonType:NSRadioButton];
|
||||||
|
// doesn't seem to have an associated bezel style
|
||||||
[b setBordered:NO];
|
[b setBordered:NO];
|
||||||
|
[b setTransparent:NO];
|
||||||
uiDarwinSetControlFont(b, NSRegularControlSize);
|
uiDarwinSetControlFont(b, NSRegularControlSize);
|
||||||
[b setTranslatesAutoresizingMaskIntoConstraints:NO];
|
[b setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// 26 june 2015
|
// 26 june 2015
|
||||||
#import "uipriv_darwin.h"
|
#import "uipriv_darwin.h"
|
||||||
|
|
||||||
// TODO restructure this whole file
|
// LONGTERM restructure this whole file
|
||||||
// TODO explicitly document this works as we want
|
// LONGTERM explicitly document this works as we want
|
||||||
// TODO note that font and color buttons also do this
|
// LONGTERM note that font and color buttons also do this
|
||||||
|
|
||||||
#define windowWindow(w) ((NSWindow *) uiControlHandle(uiControl(w)))
|
#define windowWindow(w) ((NSWindow *) uiControlHandle(uiControl(w)))
|
||||||
|
|
||||||
|
|
14
darwin/tab.m
14
darwin/tab.m
|
@ -114,8 +114,16 @@ uiDarwinControlDefaultEnabled(uiTab, tabview)
|
||||||
uiDarwinControlDefaultEnable(uiTab, tabview)
|
uiDarwinControlDefaultEnable(uiTab, tabview)
|
||||||
uiDarwinControlDefaultDisable(uiTab, tabview)
|
uiDarwinControlDefaultDisable(uiTab, tabview)
|
||||||
|
|
||||||
// TODO container update
|
static void uiTabSyncEnableState(uiDarwinControl *c, int enabled)
|
||||||
uiDarwinControlDefaultSyncEnableState(uiTab, tabview)
|
{
|
||||||
|
uiTab *t = uiTab(c);
|
||||||
|
tabPage *page;
|
||||||
|
|
||||||
|
if (uiDarwinShouldStopSyncEnableState(uiDarwinControl(t), enabled))
|
||||||
|
return;
|
||||||
|
for (page in t->pages)
|
||||||
|
uiDarwinControlSyncEnableState(uiDarwinControl(page.c), enabled);
|
||||||
|
}
|
||||||
|
|
||||||
uiDarwinControlDefaultSetSuperview(uiTab, tabview)
|
uiDarwinControlDefaultSetSuperview(uiTab, tabview)
|
||||||
|
|
||||||
|
@ -185,7 +193,7 @@ void uiTabInsertAt(uiTab *t, const char *name, uintmax_t n, uiControl *child)
|
||||||
uiControlSetParent(child, uiControl(t));
|
uiControlSetParent(child, uiControl(t));
|
||||||
|
|
||||||
view = [[[NSView alloc] initWithFrame:NSZeroRect] autorelease];
|
view = [[[NSView alloc] initWithFrame:NSZeroRect] autorelease];
|
||||||
// TODO if we turn off the autoresizing mask, nothing shows up; didn't this get documented somewhere?
|
// note: if we turn off the autoresizing mask, nothing shows up
|
||||||
uiDarwinControlSetSuperview(uiDarwinControl(child), view);
|
uiDarwinControlSetSuperview(uiDarwinControl(child), view);
|
||||||
uiDarwinControlSyncEnableState(uiDarwinControl(child), uiControlEnabledToUser(uiControl(t)));
|
uiDarwinControlSyncEnableState(uiDarwinControl(child), uiControlEnabledToUser(uiControl(t)));
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// 26 june 2015
|
// 26 june 2015
|
||||||
#include "uipriv_unix.h"
|
#include "uipriv_unix.h"
|
||||||
|
|
||||||
// TODO figure out why, and describe, that this is the desired behavior
|
// LONGTERM figure out why, and describe, that this is the desired behavior
|
||||||
// TODO also point out that font and color buttons also work like this
|
// LONGTERM also point out that font and color buttons also work like this
|
||||||
|
|
||||||
#define windowWindow(w) (GTK_WINDOW(uiControlHandle(uiControl(w))))
|
#define windowWindow(w) (GTK_WINDOW(uiControlHandle(uiControl(w))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue