GlistEngine
Loading...
Searching...
No Matches
gGUIControl.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Nitra Games Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef UI_GGUICONTROL_H_
18#define UI_GGUICONTROL_H_
19
20#include "gBaseGUIObject.h"
21
30public:
31
33 virtual ~gGUIControl() override;
34
35 virtual void set(gBaseApp* root, gBaseGUIObject* topParentGUIObject, gBaseGUIObject* parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h);
36
37 int getCursor(int x, int y) override;
38
39 void update() override;
40 void draw() override;
41
42 virtual int calculateContentHeight() {
43 return height;
44 }
45
46 virtual bool countAsSpace();
47 void setCountAsSpace(bool isSpace);
48
51
52protected:
56};
57
58#endif /* UI_GGUICONTROL_H_ */
Definition gBaseApp.h:16
gBaseApp * root
Definition gBaseGUIObject.h:151
static gFont * font
Definition gBaseGUIObject.h:137
int height
Definition gBaseGUIObject.h:124
Definition gFont.h:47
void setFont(gFont *font)
virtual bool countAsSpace()
bool countasspace
Definition gGUIControl.h:53
void update() override
void setCountAsSpace(bool isSpace)
gFont * localfont
Definition gGUIControl.h:55
virtual void set(gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h)
int oldwidth
Definition gGUIControl.h:54
int oldheight
Definition gGUIControl.h:54
gFont * getFont()
int getCursor(int x, int y) override
void draw() override
virtual int calculateContentHeight()
Definition gGUIControl.h:42
virtual ~gGUIControl() override