summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.h
blob: 6ee2760d0a26617266c1f8815ac6da5a9113c523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "widget.h"

iDeclareWidgetClass(InputWidget)
iDeclareObjectConstructionArgs(InputWidget, size_t maxLen)

enum iInputMode {
    insert_InputMode,
    overwrite_InputMode,
};

void    setMode_InputWidget     (iInputWidget *, enum iInputMode mode);
void    setMaxLen_InputWidget   (iInputWidget *, size_t maxLen);
void    setText_InputWidget     (iInputWidget *, const iString *text);
void    setTextCStr_InputWidget (iInputWidget *, const char *cstr);
void    setCursor_InputWidget   (iInputWidget *, size_t pos);
void    begin_InputWidget       (iInputWidget *);
void    end_InputWidget         (iInputWidget *, iBool accept);

const iString * text_InputWidget    (const iInputWidget *);