Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
24
Src/Wasabi/api/wnd/wndclass/editwndstring.h
Normal file
24
Src/Wasabi/api/wnd/wndclass/editwndstring.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef _EDITWNDSTRING_H
|
||||
#define _EDITWNDSTRING_H
|
||||
|
||||
#include <api/wnd/wndclass/editwnd.h>
|
||||
#include <bfc/memblock.h>
|
||||
|
||||
class EditWndString : public EditWnd
|
||||
{
|
||||
public:
|
||||
void setBuffer(wchar_t *buffer, int len=0)
|
||||
{
|
||||
b.setSize(len+1);
|
||||
wchar_t *bufmem=b.getMemory();
|
||||
if(len)
|
||||
wcsncpy(bufmem,buffer,len);
|
||||
bufmem[len]=0;
|
||||
EditWnd::setBuffer(bufmem,len);
|
||||
}
|
||||
const wchar_t *getBuffer() { return b.getMemory(); }
|
||||
private:
|
||||
MemBlock<wchar_t> b;
|
||||
};
|
||||
|
||||
#endif//_EDITWNDSTRING_H
|
Loading…
Add table
Add a link
Reference in a new issue