Migrated simple controls to C++.
This commit is contained in:
parent
b514ba7cb0
commit
6ec5f4800d
|
@ -1,5 +1,5 @@
|
||||||
// 7 april 2015
|
// 7 april 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
struct uiButton {
|
struct uiButton {
|
||||||
uiWindowsControl c;
|
uiWindowsControl c;
|
|
@ -1,5 +1,5 @@
|
||||||
// 7 april 2015
|
// 7 april 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
struct uiCheckbox {
|
struct uiCheckbox {
|
||||||
uiWindowsControl c;
|
uiWindowsControl c;
|
|
@ -1,5 +1,5 @@
|
||||||
// 20 may 2015
|
// 20 may 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// - is there extra space on the bottom?
|
// - is there extra space on the bottom?
|
||||||
|
@ -54,9 +54,9 @@ void uiComboboxAppend(uiCombobox *c, const char *text)
|
||||||
wtext = toUTF16(text);
|
wtext = toUTF16(text);
|
||||||
res = SendMessageW(c->hwnd, CB_ADDSTRING, 0, (LPARAM) wtext);
|
res = SendMessageW(c->hwnd, CB_ADDSTRING, 0, (LPARAM) wtext);
|
||||||
if (res == (LRESULT) CB_ERR)
|
if (res == (LRESULT) CB_ERR)
|
||||||
logLastError("error appending item to uiCombobox");
|
logLastError(L"error appending item to uiCombobox");
|
||||||
else if (res == (LRESULT) CB_ERRSPACE)
|
else if (res == (LRESULT) CB_ERRSPACE)
|
||||||
logLastError("memory exhausted appending item to uiCombobox");
|
logLastError(L"memory exhausted appending item to uiCombobox");
|
||||||
uiFree(wtext);
|
uiFree(wtext);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// 8 april 2015
|
// 8 april 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
struct uiEntry {
|
struct uiEntry {
|
||||||
uiWindowsControl c;
|
uiWindowsControl c;
|
||||||
|
@ -76,7 +76,7 @@ void uiEntrySetReadOnly(uiEntry *e, int readonly)
|
||||||
if (readonly)
|
if (readonly)
|
||||||
ro = (WPARAM) TRUE;
|
ro = (WPARAM) TRUE;
|
||||||
if (SendMessage(e->hwnd, EM_SETREADONLY, ro, 0) == 0)
|
if (SendMessage(e->hwnd, EM_SETREADONLY, ro, 0) == 0)
|
||||||
logLastError("error making uiEntry read-only in uiEntrySetReadOnly()");
|
logLastError(L"error making uiEntry read-only");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiEntry *uiNewEntry(void)
|
uiEntry *uiNewEntry(void)
|
|
@ -1,5 +1,5 @@
|
||||||
// 8 april 2015
|
// 8 april 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
// TODO there's alpha darkening of text going on; something is up in our parent logic
|
// TODO there's alpha darkening of text going on; something is up in our parent logic
|
||||||
// TODO resizing collapses newlines
|
// TODO resizing collapses newlines
|
||||||
|
@ -95,7 +95,7 @@ void uiMultilineEntrySetReadOnly(uiMultilineEntry *e, int readonly)
|
||||||
if (readonly)
|
if (readonly)
|
||||||
ro = (WPARAM) TRUE;
|
ro = (WPARAM) TRUE;
|
||||||
if (SendMessage(e->hwnd, EM_SETREADONLY, ro, 0) == 0)
|
if (SendMessage(e->hwnd, EM_SETREADONLY, ro, 0) == 0)
|
||||||
logLastError("error making uiMultilineEntry read-only in uiMultilineEntrySetReadOnly()");
|
logLastError(L"error making uiMultilineEntry read-only");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiMultilineEntry *uiNewMultilineEntry(void)
|
uiMultilineEntry *uiNewMultilineEntry(void)
|
|
@ -1,5 +1,5 @@
|
||||||
// 19 may 2015
|
// 19 may 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
struct uiProgressBar {
|
struct uiProgressBar {
|
||||||
uiWindowsControl c;
|
uiWindowsControl c;
|
|
@ -1,5 +1,5 @@
|
||||||
// 20 may 2015
|
// 20 may 2015
|
||||||
#include "uipriv_windows.h"
|
#include "uipriv_windows.hpp"
|
||||||
|
|
||||||
struct uiSlider {
|
struct uiSlider {
|
||||||
uiWindowsControl c;
|
uiWindowsControl c;
|
Loading…
Reference in New Issue