summaryrefslogtreecommitdiff
path: root/scene/gui/item_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/item_list.h')
-rw-r--r--scene/gui/item_list.h54
1 files changed, 47 insertions, 7 deletions
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 59fa1d8270..aa6dd64c50 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -1,3 +1,31 @@
+/*************************************************************************/
+/* item_list.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#ifndef ITEMLIST_H
#define ITEMLIST_H
@@ -33,6 +61,7 @@ private:
Color custom_bg;
Rect2 rect_cache;
+ Rect2 min_rect_cache;
Size2 get_icon_size() const;
@@ -44,6 +73,7 @@ private:
bool shape_changed;
bool ensure_selected_visible;
+ bool same_column_width;
Vector<Item> items;
Vector<int> separators;
@@ -59,14 +89,21 @@ private:
int fixed_column_width;
int max_text_lines;
int max_columns;
- Size2 min_icon_size;
- Size2 max_icon_size;
+
+ Size2 fixed_icon_size;
+
+ Size2 max_item_size_cache;
+
int defer_select_single;
bool allow_rmb_select;
+ real_t icon_scale;
+
void _scroll_changed(double);
void _input_event(const InputEvent& p_event);
+
+
protected:
void _notification(int p_what);
@@ -121,6 +158,9 @@ public:
void set_fixed_column_width(int p_size);
int get_fixed_column_width() const;
+ void set_same_column_width(bool p_enable);
+ int is_same_column_width() const;
+
void set_max_text_lines(int p_amount);
int get_max_text_lines() const;
@@ -133,11 +173,8 @@ public:
void set_icon_mode(IconMode p_mode);
IconMode get_icon_mode() const;
- void set_min_icon_size(const Size2& p_size);
- Size2 get_min_icon_size() const;
-
- void set_max_icon_size(const Size2& p_size);
- Size2 get_max_icon_size() const;
+ void set_fixed_icon_size(const Size2& p_size);
+ Size2 get_fixed_icon_size() const;
void set_allow_rmb_select(bool p_allow);
bool get_allow_rmb_select() const;
@@ -150,6 +187,9 @@ public:
virtual String get_tooltip(const Point2& p_pos) const;
int get_item_at_pos(const Point2& p_pos,bool p_exact=false) const;
+ void set_icon_scale(real_t p_scale);
+ real_t get_icon_scale() const;
+
ItemList();
~ItemList();
};