added IndexOf()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17888 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-06-21 10:33:52 +00:00
parent 781809a916
commit 362cd293d6
2 changed files with 10 additions and 2 deletions
@@ -123,6 +123,13 @@ StyleManager::HasStyle(Style* style) const
return fStyles.HasItem((void*)style);
}
// IndexOf
int32
StyleManager::IndexOf(Style* style) const
{
return fStyles.IndexOf((void*)style);
}
// StyleAt
Style*
StyleManager::StyleAt(int32 index) const
+3 -2
View File
@@ -29,6 +29,8 @@ class StyleManager : public RWLocker {
StyleManager();
virtual ~StyleManager();
static StyleManager* Default();
bool AddStyle(Style* style);
bool RemoveStyle(Style* style);
Style* RemoveStyle(int32 index);
@@ -37,6 +39,7 @@ class StyleManager : public RWLocker {
int32 CountStyles() const;
bool HasStyle(Style* style) const;
int32 IndexOf(Style* style) const;
Style* StyleAt(int32 index) const;
Style* StyleAtFast(int32 index) const;
@@ -46,8 +49,6 @@ class StyleManager : public RWLocker {
bool AddListener(StyleManagerListener* listener);
bool RemoveListener(StyleManagerListener* listener);
static StyleManager* Default();
private:
void _StateChanged();
void _MakeEmpty();