summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.h
blob: b606f974223fffe9df96e73cb5d0ca83eb7e2941 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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    setCursor_InputWidget   (iInputWidget *, size_t pos);
void    begin_InputWidget       (iInputWidget *);
void    end_InputWidget         (iInputWidget *, iBool accept);

const iString * text_InputWidget    (const iInputWidget *);