diff --git a/libs/librunview/RunView.cpp b/libs/librunview/RunView.cpp index 04acb50..0122f9b 100644 --- a/libs/librunview/RunView.cpp +++ b/libs/librunview/RunView.cpp @@ -177,10 +177,8 @@ RunView::Select(int32 startOffset, int32 endOffset) void -RunView::Append(const char* text, rgb_color color, uint16 fontFace) +RunView::Append(const char* text, rgb_color color, BFont font) { - BFont font; - font.SetFace(fontFace); text_run run = { 0, font, color }; text_run_array array = { 1, {run} }; @@ -189,6 +187,22 @@ RunView::Append(const char* text, rgb_color color, uint16 fontFace) } +void +RunView::Append(const char* text, rgb_color color, uint16 fontFace) +{ + BFont font; + font.SetFace(fontFace); + Append(text, color, font); +} + + +void +RunView::Append(const char* text, rgb_color color) +{ + Append(text, color, BFont()); +} + + void RunView::Append(const char* text) { diff --git a/libs/librunview/RunView.h b/libs/librunview/RunView.h index 8bd0fdb..34648f6 100644 --- a/libs/librunview/RunView.h +++ b/libs/librunview/RunView.h @@ -26,8 +26,9 @@ public: virtual void Select(int32 startOffset, int32 endOffset); - void Append(const char* text, rgb_color color, - uint16 fontFace = B_REGULAR_FACE); + void Append(const char* text, rgb_color color, BFont font); + void Append(const char* text, rgb_color color, uint16 fontFace); + void Append(const char* text, rgb_color color); void Append(const char* text); BString WordAt(BPoint point);