1 /*$
2  Copyright (C) 2016-2020 Azel.
3 
4  This file is part of AzPainterB.
5 
6  AzPainterB is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  AzPainterB is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 $*/
19 
20 #ifndef MLIB_WIDGET_PV_H
21 #define MLIB_WIDGET_PV_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef struct _mWidgetLabelTextRowInfo
28 {
29 	int pos,len,width;
30 }mWidgetLabelTextRowInfo;
31 
32 
33 /*---- mWidget ----*/
34 
35 mWidget *__mWidgetGetTreeNext(mWidget *p);
36 mWidget *__mWidgetGetTreeNextPass(mWidget *p);
37 mWidget *__mWidgetGetTreeNextPass_root(mWidget *p,mWidget *root);
38 mWidget *__mWidgetGetTreeNext_root(mWidget *p,mWidget *root);
39 
40 mWidget *__mWidgetGetTreeNext_follow_ui(mWidget *p,uint32_t follow_mask,uint32_t run_mask);
41 mWidget *__mWidgetGetTreeNext_follow_uidraw(mWidget *p);
42 
43 void __mWidgetSetTreeUpper_ui(mWidget *p,uint32_t flags);
44 
45 mWidget *__mWidgetGetTreeNext_state(mWidget *p,mWidget *root,uint32_t mask);
46 
47 mBool __mWidgetGetClipRect(mWidget *wg,mRect *rcdst);
48 
49 void __mWidgetOnResize(mWidget *p);
50 void __mWidgetCalcHint(mWidget *p);
51 
52 int __mWidgetGetLayoutW(mWidget *p);
53 int __mWidgetGetLayoutH(mWidget *p);
54 int __mWidgetGetLayoutW_space(mWidget *p);
55 int __mWidgetGetLayoutH_space(mWidget *p);
56 void __mWidgetGetLayoutCalcSize(mWidget *p,mSize *hint,mSize *init);
57 
58 void __mWidgetSetFocus(mWidget *p,int by);
59 void __mWidgetKillFocus(mWidget *p,int by);
60 void __mWidgetRemoveFocus(mWidget *p);
61 void __mWidgetRemoveFocus_byDisable(mWidget *p);
62 
63 mWidgetLabelTextRowInfo *__mWidgetGetLabelTextRowInfo(const char *text);
64 void __mWidgetGetLabelTextSize(mWidget *p,const char *text,mWidgetLabelTextRowInfo *buf,mSize *dstsize);
65 
66 /*---- mWindow ----*/
67 
68 mWidget *__mWindowGetDefaultFocusWidget(mWindow *win);
69 mBool __mWindowSetFocus(mWindow *win,mWidget *focus,int by);
70 mBool __mWindowMoveNextFocus(mWindow *win);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif
77