added IndexOf()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17888 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -123,6 +123,13 @@ StyleManager::HasStyle(Style* style) const
|
|||||||
return fStyles.HasItem((void*)style);
|
return fStyles.HasItem((void*)style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IndexOf
|
||||||
|
int32
|
||||||
|
StyleManager::IndexOf(Style* style) const
|
||||||
|
{
|
||||||
|
return fStyles.IndexOf((void*)style);
|
||||||
|
}
|
||||||
|
|
||||||
// StyleAt
|
// StyleAt
|
||||||
Style*
|
Style*
|
||||||
StyleManager::StyleAt(int32 index) const
|
StyleManager::StyleAt(int32 index) const
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class StyleManager : public RWLocker {
|
|||||||
StyleManager();
|
StyleManager();
|
||||||
virtual ~StyleManager();
|
virtual ~StyleManager();
|
||||||
|
|
||||||
|
static StyleManager* Default();
|
||||||
|
|
||||||
bool AddStyle(Style* style);
|
bool AddStyle(Style* style);
|
||||||
bool RemoveStyle(Style* style);
|
bool RemoveStyle(Style* style);
|
||||||
Style* RemoveStyle(int32 index);
|
Style* RemoveStyle(int32 index);
|
||||||
@@ -37,6 +39,7 @@ class StyleManager : public RWLocker {
|
|||||||
|
|
||||||
int32 CountStyles() const;
|
int32 CountStyles() const;
|
||||||
bool HasStyle(Style* style) const;
|
bool HasStyle(Style* style) const;
|
||||||
|
int32 IndexOf(Style* style) const;
|
||||||
|
|
||||||
Style* StyleAt(int32 index) const;
|
Style* StyleAt(int32 index) const;
|
||||||
Style* StyleAtFast(int32 index) const;
|
Style* StyleAtFast(int32 index) const;
|
||||||
@@ -46,8 +49,6 @@ class StyleManager : public RWLocker {
|
|||||||
bool AddListener(StyleManagerListener* listener);
|
bool AddListener(StyleManagerListener* listener);
|
||||||
bool RemoveListener(StyleManagerListener* listener);
|
bool RemoveListener(StyleManagerListener* listener);
|
||||||
|
|
||||||
static StyleManager* Default();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _StateChanged();
|
void _StateChanged();
|
||||||
void _MakeEmpty();
|
void _MakeEmpty();
|
||||||
|
|||||||
Reference in New Issue
Block a user