2010-07-10 08:58:15 -05:00
|
|
|
/*
|
2021-07-14 13:17:00 -05:00
|
|
|
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
2010-05-07 04:47:10 -05:00
|
|
|
*/
|
2021-07-14 13:17:00 -05:00
|
|
|
#ifndef _RUN_VIEW_H
|
|
|
|
#define _RUN_VIEW_H
|
2010-07-10 08:58:15 -05:00
|
|
|
|
2021-07-14 13:17:00 -05:00
|
|
|
#include <TextView.h>
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-07-10 08:58:15 -05:00
|
|
|
|
2021-07-14 13:17:00 -05:00
|
|
|
class RunView : public BTextView {
|
2010-07-10 08:58:15 -05:00
|
|
|
public:
|
2021-07-14 13:17:00 -05:00
|
|
|
RunView(const char* name);
|
2010-07-10 08:58:15 -05:00
|
|
|
|
2021-07-14 15:13:36 -05:00
|
|
|
void Append(const char* text, rgb_color color,
|
|
|
|
uint16 fontFace = B_REGULAR_FACE);
|
|
|
|
void Append(const char* text);
|
|
|
|
|
|
|
|
// Only differs in that it changes font face and color of any URLs
|
|
|
|
virtual void Insert(const char* text, const text_run_array* runs = NULL);
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2021-07-14 13:17:00 -05:00
|
|
|
private:
|
|
|
|
bool fLastStyled;
|
|
|
|
text_run_array fDefaultRun;
|
2021-07-14 15:13:36 -05:00
|
|
|
text_run_array fUrlRun;
|
2010-05-07 04:47:10 -05:00
|
|
|
};
|
|
|
|
|
2021-07-14 13:17:00 -05:00
|
|
|
#endif // _RUN_VIEW_H
|