mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +00:00
LibGUI+FileManager: Add a GIcon class to support multi-size icons.
A GIcon can contain any number of bitmaps internally, and will give you the best fitting icon when you call bitmap_for_size().
This commit is contained in:
parent
7e54fdce99
commit
86413a6f5a
12 changed files with 165 additions and 23 deletions
|
@ -64,6 +64,7 @@ public:
|
|||
bool operator==(const Iterator& other) const { return m_node == other.m_node; }
|
||||
Iterator& operator++() { m_node = m_node->next; return *this; }
|
||||
T& operator*() { return m_node->value; }
|
||||
T* operator->() { return &m_node->value; }
|
||||
bool is_end() const { return !m_node; }
|
||||
static Iterator universal_end() { return Iterator(nullptr); }
|
||||
private:
|
||||
|
@ -81,6 +82,7 @@ public:
|
|||
bool operator==(const ConstIterator& other) const { return m_node == other.m_node; }
|
||||
ConstIterator& operator++() { m_node = m_node->next; return *this; }
|
||||
const T& operator*() const { return m_node->value; }
|
||||
const T* operator->() const { return &m_node->value; }
|
||||
bool is_end() const { return !m_node; }
|
||||
static ConstIterator universal_end() { return ConstIterator(nullptr); }
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue