* add protected accessor for baseline offset to StringItem, as that value is of
interest to derived classes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42665 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fab63078c9
commit
7ba0381def
@ -30,6 +30,9 @@ public:
|
||||
|
||||
virtual status_t Perform(perform_code code, void* arg);
|
||||
|
||||
protected:
|
||||
float BaselineOffset() const;
|
||||
|
||||
private:
|
||||
// FBC padding and forbidden methods
|
||||
virtual void _ReservedStringItem1();
|
||||
|
@ -22,7 +22,7 @@ BStringItem::BStringItem(const char* text, uint32 level, bool expanded)
|
||||
: BListItem(level, expanded),
|
||||
fText(NULL),
|
||||
fBaselineOffset(0)
|
||||
{
|
||||
{
|
||||
SetText(text);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ BStringItem::SetText(const char *text)
|
||||
{
|
||||
free(fText);
|
||||
fText = NULL;
|
||||
|
||||
|
||||
if (text)
|
||||
fText = strdup(text);
|
||||
}
|
||||
@ -142,6 +142,13 @@ BStringItem::Perform(perform_code d, void *arg)
|
||||
}
|
||||
|
||||
|
||||
float
|
||||
BStringItem::BaselineOffset() const
|
||||
{
|
||||
return fBaselineOffset;
|
||||
}
|
||||
|
||||
|
||||
void BStringItem::_ReservedStringItem1() {}
|
||||
void BStringItem::_ReservedStringItem2() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user