Changed to use a BString for storing the status text instead of a char *
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4211 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,16 +7,15 @@
|
|||||||
ShowImageStatusView::ShowImageStatusView(BRect r, const char* name, uint32 resizingMode, uint32 flags)
|
ShowImageStatusView::ShowImageStatusView(BRect r, const char* name, uint32 resizingMode, uint32 flags)
|
||||||
: BView(r, name, resizingMode, flags)
|
: BView(r, name, resizingMode, flags)
|
||||||
{
|
{
|
||||||
m_caption = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowImageStatusView::Draw(BRect updateRect)
|
void ShowImageStatusView::Draw(BRect updateRect)
|
||||||
{
|
{
|
||||||
DrawString( m_caption, BPoint( 3, 11) );
|
DrawString( fstrText.String(), BPoint( 3, 11) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowImageStatusView::SetCaption( char * Caption )
|
void ShowImageStatusView::SetText(BString &strText)
|
||||||
{
|
{
|
||||||
m_caption = Caption;
|
fstrText = strText;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#define _ShowImageStatusView_h
|
#define _ShowImageStatusView_h
|
||||||
|
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
#include <String.h>
|
||||||
|
|
||||||
class ShowImageStatusView : public BView
|
class ShowImageStatusView : public BView
|
||||||
{
|
{
|
||||||
@@ -14,10 +15,10 @@ public:
|
|||||||
|
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
|
|
||||||
void SetCaption( char * Caption );
|
void SetText(BString &strText);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char * m_caption;
|
BString fstrText;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _ShowImageStatusView_h */
|
#endif /* _ShowImageStatusView_h */
|
||||||
|
|||||||
Reference in New Issue
Block a user