Skip to content

Commit e2993ea

Browse files
Sylvain78github-actions[bot]
authored andcommitted
Apply clang-format changes
1 parent 40d8043 commit e2993ea

27 files changed

+945
-1007
lines changed

Src/Headers/BubbleHelper.h

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,32 @@
2727
#include <be/interface/TextView.h>
2828
#include <be/interface/View.h>
2929

30-
class BubbleHelper
31-
{
32-
public:
33-
BubbleHelper(rgb_color color);
34-
virtual ~BubbleHelper();
35-
36-
void SetHelp(BView *view, const char *text);
37-
void EnableHelp(bool enable = true);
38-
void SetColor(rgb_color color);
39-
40-
private:
41-
void DisplayHelp(char *text, BPoint where);
42-
void Helper();
43-
char *GetHelp(BView *view);
44-
static status_t _helper(void *arg);
45-
BView *FindView(BPoint where);
46-
47-
void HideBubble();
48-
void ShowBubble(BPoint dest);
49-
50-
private:
51-
rgb_color m_bubbleColor;
52-
thread_id m_helperthread;
53-
BList *m_helplist;
54-
BWindow *m_textwin;
55-
BTextView *m_textview;
56-
bool m_enabled;
30+
class BubbleHelper {
31+
public:
32+
BubbleHelper(rgb_color color);
33+
virtual ~BubbleHelper();
34+
35+
void SetHelp(BView* view, const char* text);
36+
void EnableHelp(bool enable = true);
37+
void SetColor(rgb_color color);
38+
39+
private:
40+
void DisplayHelp(char* text, BPoint where);
41+
void Helper();
42+
char* GetHelp(BView* view);
43+
static status_t _helper(void* arg);
44+
BView* FindView(BPoint where);
45+
46+
void HideBubble();
47+
void ShowBubble(BPoint dest);
48+
49+
private:
50+
rgb_color m_bubbleColor;
51+
thread_id m_helperthread;
52+
BList* m_helplist;
53+
BWindow* m_textwin;
54+
BTextView* m_textview;
55+
bool m_enabled;
5756
};
5857

5958
#endif

Src/Headers/ColorButton.h

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,40 @@
77
#ifndef COLOR_BUTTON_H
88
#define COLOR_BUTTON_H
99

10-
#include <be/interface/Rect.h>
1110
#include <be/interface/Bitmap.h>
12-
#include <be/interface/View.h>
1311
#include <be/interface/Control.h>
12+
#include <be/interface/Rect.h>
13+
#include <be/interface/View.h>
1414
#include <be/support/String.h>
1515
#include "ColorWindow.h"
1616

17-
class ColorButton : public BControl
18-
{
19-
public:
20-
ColorButton(BRect frame, BString name, BMessage* message, rgb_color color, BString label);
21-
virtual ~ColorButton();
22-
23-
virtual void MessageReceived(BMessage* message);
24-
virtual void AttachedToWindow();
25-
virtual void Draw(BRect updateRect);
26-
virtual void MouseDown(BPoint point);
27-
virtual void MouseUp(BPoint point);
28-
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage* message);
29-
30-
virtual status_t Invoke(BMessage* message = NULL);
31-
void Render();
32-
33-
void SetValue(rgb_color color);
34-
rgb_color Value();
35-
36-
private:
37-
BBitmap *m_bitmap;
38-
BView *m_bitmapView;
39-
ColorWindow *m_colorWindow;
40-
rgb_color m_color;
41-
42-
BString m_label;
43-
44-
bool m_isDown,
45-
m_isOver,
46-
m_okToInvoke;
17+
class ColorButton : public BControl {
18+
public:
19+
ColorButton(BRect frame, BString name, BMessage* message, rgb_color color, BString label);
20+
virtual ~ColorButton();
21+
22+
virtual void MessageReceived(BMessage* message);
23+
virtual void AttachedToWindow();
24+
virtual void Draw(BRect updateRect);
25+
virtual void MouseDown(BPoint point);
26+
virtual void MouseUp(BPoint point);
27+
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage* message);
28+
29+
virtual status_t Invoke(BMessage* message = NULL);
30+
void Render();
31+
32+
void SetValue(rgb_color color);
33+
rgb_color Value();
34+
35+
private:
36+
BBitmap* m_bitmap;
37+
BView* m_bitmapView;
38+
ColorWindow* m_colorWindow;
39+
rgb_color m_color;
40+
41+
BString m_label;
42+
43+
bool m_isDown, m_isOver, m_okToInvoke;
4744
};
4845

4946
#endif

Src/Headers/ColorView.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,20 @@
1414
/** About this class: This class is a simple subclassed BView,
1515
that uses a view to draw into a Bitmap, so it's drawing is rendered flicker-free.
1616
*/
17-
class ColorView : public BView
18-
{
19-
public:
20-
ColorView(BRect frame);
21-
virtual ~ColorView();
22-
23-
virtual void Draw(BRect drawRect);
24-
void Render();
25-
void SetColor(rgb_color color);
17+
class ColorView : public BView {
18+
public:
19+
ColorView(BRect frame);
20+
virtual ~ColorView();
2621

27-
protected:
28-
BBitmap* m_bitmap;
29-
BView* m_bitmapView;
30-
31-
rgb_color m_color;
22+
virtual void Draw(BRect drawRect);
23+
void Render();
24+
void SetColor(rgb_color color);
25+
26+
protected:
27+
BBitmap* m_bitmap;
28+
BView* m_bitmapView;
29+
30+
rgb_color m_color;
3231
};
3332

3433
#endif

Src/Headers/ColorWindow.h

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,45 @@
77
#ifndef COLOR_WINDOW_H
88
#define COLOR_WINDOW_H
99

10-
#include <be/app/Messenger.h>
10+
#include <TypeConstants.h>
1111
#include <be/app/Message.h>
12-
#include <be/interface/Rect.h>
13-
#include <be/interface/Point.h>
14-
#include <be/interface/Window.h>
15-
#include <be/interface/View.h>
12+
#include <be/app/Messenger.h>
1613
#include <be/interface/Button.h>
1714
#include <be/interface/ColorControl.h>
18-
#include <TypeConstants.h>
15+
#include <be/interface/Point.h>
16+
#include <be/interface/Rect.h>
17+
#include <be/interface/View.h>
18+
#include <be/interface/Window.h>
1919
#include "ColorView.h"
2020

21-
class FastColor : public BColorControl
22-
{
23-
public:
24-
FastColor(ColorView *theWell, BPoint leftTop, color_control_layout matrix, float cellSide, const char* name, BMessage* message = NULL, bool bufferedDrawing = false);
25-
26-
void SetValue(int32 v);
27-
void SetValue(rgb_color color);
28-
29-
private:
30-
ColorView *well;
21+
class FastColor : public BColorControl {
22+
public:
23+
FastColor(ColorView* theWell, BPoint leftTop, color_control_layout matrix, float cellSide,
24+
const char* name, BMessage* message = NULL, bool bufferedDrawing = false);
25+
26+
void SetValue(int32 v);
27+
void SetValue(rgb_color color);
28+
29+
private:
30+
ColorView* well;
3131
};
3232

33-
class ColorWindow : public BWindow
34-
{
35-
public:
36-
ColorWindow(BRect frame, BMessenger* messenger, rgb_color color);
37-
virtual ~ColorWindow();
38-
39-
virtual void MessageReceived(BMessage *message);
40-
void Quit();
41-
42-
private:
43-
BMessenger *m_msgr;
44-
45-
BButton *m_okButton,
46-
*m_cancelButton;
47-
48-
BView *m_parent;
49-
FastColor *m_ctrlBox;
50-
ColorView *m_colorView;
33+
class ColorWindow : public BWindow {
34+
public:
35+
ColorWindow(BRect frame, BMessenger* messenger, rgb_color color);
36+
virtual ~ColorWindow();
37+
38+
virtual void MessageReceived(BMessage* message);
39+
void Quit();
40+
41+
private:
42+
BMessenger* m_msgr;
43+
44+
BButton *m_okButton, *m_cancelButton;
45+
46+
BView* m_parent;
47+
FastColor* m_ctrlBox;
48+
ColorView* m_colorView;
5149
};
5250

5351
#endif

Src/Headers/Constants.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ operator==(const rgb_color& a, const rgb_color& b)
2121
return CompareColors(a, b);
2222
}
2323

24-
inline bool operator!=(rgb_color &a, rgb_color &b)
24+
inline bool
25+
operator!=(rgb_color& a, rgb_color& b)
2526
{
2627
return !CompareColors(a, b);
2728
}

Src/Headers/DoubleBufferedView.h

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,29 @@
1515
Most of the code based on idea by Ramshankar
1616
@author Tim de Jong
1717
*/
18-
class DoubleBufferedView : public BView
19-
{
20-
public:
21-
DoubleBufferedView(BRect frame, const char *name, uint32 resizingMode, uint32 flags);
22-
virtual ~DoubleBufferedView();
23-
24-
virtual void AttachedToWindow();
25-
virtual void FrameResized(float width, float height);
26-
virtual void Draw(BRect updateRect);
18+
class DoubleBufferedView : public BView {
19+
public:
20+
DoubleBufferedView(BRect frame, const char* name, uint32 resizingMode, uint32 flags);
21+
virtual ~DoubleBufferedView();
2722

28-
virtual void Invalidate();
29-
30-
virtual void RenderView();
31-
/** This abstract function has to be implemented by the subclasses to draw
32-
the actual view content. The content has to be drawn into the backView.
33-
@param backView, the view that will be used for the double buffered drawing,
34-
the backView will be passed as a parameter by the RenderView function.
35-
*/
36-
virtual void DrawContent(BView* backView) = 0;
37-
BBitmap* GetBufferBitmap();
38-
39-
private:
40-
BBitmap *m_backBitmap;
41-
BView *m_backView;
23+
virtual void AttachedToWindow();
24+
virtual void FrameResized(float width, float height);
25+
virtual void Draw(BRect updateRect);
26+
27+
virtual void Invalidate();
28+
29+
virtual void RenderView();
30+
/** This abstract function has to be implemented by the subclasses to draw
31+
the actual view content. The content has to be drawn into the backView.
32+
@param backView, the view that will be used for the double buffered drawing,
33+
the backView will be passed as a parameter by the RenderView function.
34+
*/
35+
virtual void DrawContent(BView* backView) = 0;
36+
BBitmap* GetBufferBitmap();
37+
38+
private:
39+
BBitmap* m_backBitmap;
40+
BView* m_backView;
4241
};
4342

4443
#endif

Src/Headers/GoToLineWindow.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,28 @@
77
#ifndef _GOTOLINE_WINDOW_H_
88
#define _GOTOLINE_WINDOW_H_
99

10-
#include <Window.h>
11-
#include <View.h>
1210
#include <Button.h>
13-
#include <iostream>
11+
#include <Font.h>
1412
#include <Messenger.h>
15-
#include "Constants.h"
13+
#include <String.h>
1614
#include <TextControl.h>
17-
#include <Font.h>
15+
#include <View.h>
16+
#include <Window.h>
1817
#include <cctype>
19-
#include <String.h>
18+
#include <iostream>
2019
#include <string>
21-
class GoToLineWindow : public BWindow
22-
{
23-
public:
24-
GoToLineWindow(BRect r,BMessenger* messenger);
25-
~GoToLineWindow();
26-
virtual void MessageReceived(BMessage* msg);
27-
void Quit();
28-
private:
29-
BView* parent;
30-
BMessenger* msgr;
31-
BButton* go;
32-
BTextControl* num;
20+
#include "Constants.h"
21+
class GoToLineWindow : public BWindow {
22+
public:
23+
GoToLineWindow(BRect r, BMessenger* messenger);
24+
~GoToLineWindow();
25+
virtual void MessageReceived(BMessage* msg);
26+
void Quit();
27+
28+
private:
29+
BView* parent;
30+
BMessenger* msgr;
31+
BButton* go;
32+
BTextControl* num;
3333
};
3434
#endif
35-

0 commit comments

Comments
 (0)