Some TODO resolution and stale TODO removal.
This commit is contained in:
parent
03337f61f1
commit
94587b660f
|
@ -3,7 +3,7 @@
|
||||||
#include "../ui.h"
|
#include "../ui.h"
|
||||||
#include "uipriv.h"
|
#include "uipriv.h"
|
||||||
|
|
||||||
void setIdentity(uiDrawMatrix *m)
|
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
|
||||||
{
|
{
|
||||||
m->M11 = 1;
|
m->M11 = 1;
|
||||||
m->M12 = 0;
|
m->M12 = 0;
|
||||||
|
|
|
@ -40,7 +40,6 @@ extern void clickCounterReset(clickCounter *);
|
||||||
extern int fromScancode(uintptr_t, uiAreaKeyEvent *);
|
extern int fromScancode(uintptr_t, uiAreaKeyEvent *);
|
||||||
|
|
||||||
// matrix.c
|
// matrix.c
|
||||||
extern void setIdentity(uiDrawMatrix *);
|
|
||||||
extern void fallbackSkew(uiDrawMatrix *, double, double, double, double);
|
extern void fallbackSkew(uiDrawMatrix *, double, double, double, double);
|
||||||
extern void fallbackTranslate(uiDrawMatrix *, double, double);
|
extern void fallbackTranslate(uiDrawMatrix *, double, double);
|
||||||
extern void scaleCenter(double, double, double *, double *);
|
extern void scaleCenter(double, double, double *, double *);
|
||||||
|
|
|
@ -76,8 +76,6 @@ char *uiButtonText(uiButton *b)
|
||||||
void uiButtonSetText(uiButton *b, const char *text)
|
void uiButtonSetText(uiButton *b, const char *text)
|
||||||
{
|
{
|
||||||
[b->button setTitle:toNSString(text)];
|
[b->button setTitle:toNSString(text)];
|
||||||
// this may result in the size of the button changing
|
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(b));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)
|
void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
// 14 august 2015
|
// 14 august 2015
|
||||||
#import "uipriv_darwin.h"
|
#import "uipriv_darwin.h"
|
||||||
|
|
||||||
// TODO the intrinsic height of this seems to be wacky
|
|
||||||
|
|
||||||
struct uiCheckbox {
|
struct uiCheckbox {
|
||||||
uiDarwinControl c;
|
uiDarwinControl c;
|
||||||
NSButton *button;
|
NSButton *button;
|
||||||
|
@ -78,10 +76,6 @@ char *uiCheckboxText(uiCheckbox *c)
|
||||||
void uiCheckboxSetText(uiCheckbox *c, const char *text)
|
void uiCheckboxSetText(uiCheckbox *c, const char *text)
|
||||||
{
|
{
|
||||||
[c->button setTitle:toNSString(text)];
|
[c->button setTitle:toNSString(text)];
|
||||||
// this may result in the size of the checkbox changing
|
|
||||||
// TODO something somewhere is causing this to corrupt some memory so that, for instance, page7b's mouseExited: never triggers on 10.11; figure out what
|
|
||||||
// TODO is this related to map-related crashes?
|
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(c));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), void *data)
|
void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), void *data)
|
||||||
|
|
|
@ -312,12 +312,6 @@ static void c2m(CGAffineTransform *c, uiDrawMatrix *m)
|
||||||
m->M32 = c->ty;
|
m->M32 = c->ty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO get rid of the separate setIdentity()
|
|
||||||
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
|
|
||||||
{
|
|
||||||
setIdentity(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
||||||
{
|
{
|
||||||
CGAffineTransform c;
|
CGAffineTransform c;
|
||||||
|
|
|
@ -127,8 +127,6 @@ char *uiGroupTitle(uiGroup *g)
|
||||||
void uiGroupSetTitle(uiGroup *g, const char *title)
|
void uiGroupSetTitle(uiGroup *g, const char *title)
|
||||||
{
|
{
|
||||||
[g->box setTitle:toNSString(title)];
|
[g->box setTitle:toNSString(title)];
|
||||||
// changing the text might necessitate a change in the groupbox's size
|
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(g));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiGroupSetChild(uiGroup *g, uiControl *child)
|
void uiGroupSetChild(uiGroup *g, uiControl *child)
|
||||||
|
|
|
@ -16,8 +16,6 @@ char *uiLabelText(uiLabel *l)
|
||||||
void uiLabelSetText(uiLabel *l, const char *text)
|
void uiLabelSetText(uiLabel *l, const char *text)
|
||||||
{
|
{
|
||||||
[l->textfield setStringValue:toNSString(text)];
|
[l->textfield setStringValue:toNSString(text)];
|
||||||
// changing the text might necessitate a change in the label's size
|
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(l));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uiLabel *uiNewLabel(const char *text)
|
uiLabel *uiNewLabel(const char *text)
|
||||||
|
|
|
@ -34,8 +34,6 @@ void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
|
||||||
[r->matrix setAllowsEmptySelection:YES];
|
[r->matrix setAllowsEmptySelection:YES];
|
||||||
[r->matrix selectCellAtRow:prevSelection column:0];
|
[r->matrix selectCellAtRow:prevSelection column:0];
|
||||||
[r->matrix setAllowsEmptySelection:NO];
|
[r->matrix setAllowsEmptySelection:NO];
|
||||||
|
|
||||||
uiDarwinControlTriggerRelayout(uiDarwinControl(r));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uiRadioButtons *uiNewRadioButtons(void)
|
uiRadioButtons *uiNewRadioButtons(void)
|
||||||
|
|
|
@ -106,6 +106,3 @@ extern void doDrawText(CGContextRef c, CGFloat cheight, double x, double y, uiDr
|
||||||
// fontbutton.m
|
// fontbutton.m
|
||||||
extern BOOL fontButtonInhibitSendAction(SEL sel, id from, id to);
|
extern BOOL fontButtonInhibitSendAction(SEL sel, id from, id to);
|
||||||
extern BOOL fontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override);
|
extern BOOL fontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override);
|
||||||
|
|
||||||
// MASSIVE TODO
|
|
||||||
#define uiDarwinControlTriggerRelayout(...)
|
|
||||||
|
|
|
@ -22,11 +22,6 @@ static void c2m(cairo_matrix_t *c, uiDrawMatrix *m)
|
||||||
m->M32 = c->y0;
|
m->M32 = c->y0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
|
|
||||||
{
|
|
||||||
setIdentity(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
||||||
{
|
{
|
||||||
cairo_matrix_t c;
|
cairo_matrix_t c;
|
||||||
|
|
|
@ -22,11 +22,6 @@ static void d2m(D2D1_MATRIX_3X2_F *d, uiDrawMatrix *m)
|
||||||
m->M32 = d->_32;
|
m->M32 = d->_32;
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
|
|
||||||
{
|
|
||||||
setIdentity(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
|
||||||
{
|
{
|
||||||
D2D1_MATRIX_3X2_F dm;
|
D2D1_MATRIX_3X2_F dm;
|
||||||
|
|
Loading…
Reference in New Issue