Some TODO resolution and stale TODO removal.

This commit is contained in:
Pietro Gagliardi 2016-05-13 17:54:10 -04:00
parent 03337f61f1
commit 94587b660f
11 changed files with 1 additions and 35 deletions

View File

@ -3,7 +3,7 @@
#include "../ui.h"
#include "uipriv.h"
void setIdentity(uiDrawMatrix *m)
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
{
m->M11 = 1;
m->M12 = 0;

View File

@ -40,7 +40,6 @@ extern void clickCounterReset(clickCounter *);
extern int fromScancode(uintptr_t, uiAreaKeyEvent *);
// matrix.c
extern void setIdentity(uiDrawMatrix *);
extern void fallbackSkew(uiDrawMatrix *, double, double, double, double);
extern void fallbackTranslate(uiDrawMatrix *, double, double);
extern void scaleCenter(double, double, double *, double *);

View File

@ -76,8 +76,6 @@ char *uiButtonText(uiButton *b)
void uiButtonSetText(uiButton *b, const char *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)

View File

@ -1,8 +1,6 @@
// 14 august 2015
#import "uipriv_darwin.h"
// TODO the intrinsic height of this seems to be wacky
struct uiCheckbox {
uiDarwinControl c;
NSButton *button;
@ -78,10 +76,6 @@ char *uiCheckboxText(uiCheckbox *c)
void uiCheckboxSetText(uiCheckbox *c, const char *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)

View File

@ -312,12 +312,6 @@ static void c2m(CGAffineTransform *c, uiDrawMatrix *m)
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)
{
CGAffineTransform c;

View File

@ -127,8 +127,6 @@ char *uiGroupTitle(uiGroup *g)
void uiGroupSetTitle(uiGroup *g, const char *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)

View File

@ -16,8 +16,6 @@ char *uiLabelText(uiLabel *l)
void uiLabelSetText(uiLabel *l, const char *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)

View File

@ -34,8 +34,6 @@ void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
[r->matrix setAllowsEmptySelection:YES];
[r->matrix selectCellAtRow:prevSelection column:0];
[r->matrix setAllowsEmptySelection:NO];
uiDarwinControlTriggerRelayout(uiDarwinControl(r));
}
uiRadioButtons *uiNewRadioButtons(void)

View File

@ -106,6 +106,3 @@ extern void doDrawText(CGContextRef c, CGFloat cheight, double x, double y, uiDr
// fontbutton.m
extern BOOL fontButtonInhibitSendAction(SEL sel, id from, id to);
extern BOOL fontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override);
// MASSIVE TODO
#define uiDarwinControlTriggerRelayout(...)

View File

@ -22,11 +22,6 @@ static void c2m(cairo_matrix_t *c, uiDrawMatrix *m)
m->M32 = c->y0;
}
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
{
setIdentity(m);
}
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
{
cairo_matrix_t c;

View File

@ -22,11 +22,6 @@ static void d2m(D2D1_MATRIX_3X2_F *d, uiDrawMatrix *m)
m->M32 = d->_32;
}
void uiDrawMatrixSetIdentity(uiDrawMatrix *m)
{
setIdentity(m);
}
void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)
{
D2D1_MATRIX_3X2_F dm;