Skip to content

Commit ac132d6

Browse files
korligithub-actions[bot]
authored andcommitted
Apply clang-format changes
1 parent 01bc239 commit ac132d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+8935
-9637
lines changed

Src/Headers/AboutWindow.h

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,50 @@
77
#ifndef ABOUT_WINDOW_H
88
#define ABOUT_WINDOW_H
99

10-
#include <be/app/Messenger.h>
1110
#include <be/app/Message.h>
11+
#include <be/app/Messenger.h>
12+
#include <be/interface/Bitmap.h>
13+
#include <be/interface/Button.h>
1214
#include <be/interface/Rect.h>
1315
#include <be/interface/View.h>
14-
#include <be/interface/Bitmap.h>
1516
#include <be/interface/Window.h>
16-
#include <be/interface/Button.h>
1717
#include "GradientView.h"
1818

1919
const uint32 UPDATE_COLORS = 'updt';
2020
const int32 UPDATE_TIME = 100;
2121

22-
class AboutView : public BView
23-
{
24-
public:
25-
AboutView(BRect frame);
26-
virtual ~AboutView();
27-
28-
virtual void Draw(BRect updateRect);
22+
class AboutView : public BView {
23+
public:
24+
AboutView(BRect frame);
25+
virtual ~AboutView();
26+
27+
virtual void Draw(BRect updateRect);
2928

30-
private:
31-
void ConvertRGB32ToGreyRGB32(BBitmap* b);
32-
33-
private:
34-
BBitmap *m_logo;
29+
private:
30+
void ConvertRGB32ToGreyRGB32(BBitmap* b);
31+
32+
private:
33+
BBitmap* m_logo;
3534
};
3635

37-
class AboutWindow : public BWindow
38-
{
39-
public:
40-
AboutWindow(BRect frame, BMessenger *messenger);
41-
virtual ~AboutWindow();
42-
43-
virtual void MessageReceived(BMessage* message);
44-
void Quit();
45-
46-
private:
47-
AboutView *m_about;
48-
BMessenger *m_msgr;
49-
50-
BButton *m_homePage,
51-
*m_donate,
52-
*m_beBits,
53-
*m_quit
54-
;
55-
56-
GradientView *m_gradient;
57-
58-
rgb_color m_top,
59-
m_bottom;
60-
61-
bool m_tup,
62-
m_bup;
36+
class AboutWindow : public BWindow {
37+
public:
38+
AboutWindow(BRect frame, BMessenger* messenger);
39+
virtual ~AboutWindow();
40+
41+
virtual void MessageReceived(BMessage* message);
42+
void Quit();
43+
44+
private:
45+
AboutView* m_about;
46+
BMessenger* m_msgr;
47+
48+
BButton *m_homePage, *m_donate, *m_beBits, *m_quit;
49+
50+
GradientView* m_gradient;
51+
52+
rgb_color m_top, m_bottom;
6353

54+
bool m_tup, m_bup;
6455
};
6556
#endif

Src/Headers/BeTeX.h

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
#ifndef BETEX_H
22
#define BETEX_H
33

4-
#include <be/app/Message.h>
54
#include <be/app/Application.h>
5+
#include <be/app/Message.h>
66
#include <be/interface/Alert.h>
77
#include <be/storage/Path.h>
88
#include "MainWindow.h"
99

10-
class BeTeX : public BApplication
11-
{
12-
public:
13-
BeTeX();
14-
virtual ~BeTeX();
15-
16-
virtual void AboutRequested();
17-
virtual void RefsReceived(BMessage* message);
18-
virtual bool QuitRequested();
19-
20-
private:
21-
MainWindow *m_mainWindow;
22-
BAlert *m_aboutBetex;
23-
BPath m_prefsPath;
10+
class BeTeX : public BApplication {
11+
public:
12+
BeTeX();
13+
virtual ~BeTeX();
14+
15+
virtual void AboutRequested();
16+
virtual void RefsReceived(BMessage* message);
17+
virtual bool QuitRequested();
18+
19+
private:
20+
MainWindow* m_mainWindow;
21+
BAlert* m_aboutBetex;
22+
BPath m_prefsPath;
2423
};
2524

26-
#endif
25+
#endif

Src/Headers/BitmapUtils.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ class BBitmap;
2020

2121
class BitmapUtils {
2222
public:
23+
static BBitmap* Grayscale(BBitmap* bitmap);
2324

24-
static BBitmap * Grayscale(BBitmap *bitmap);
25-
26-
static BBitmap * LoadFromResource(const char *name);
27-
static BBitmap * LoadFromResource(int32 id);
25+
static BBitmap* LoadFromResource(const char* name);
26+
static BBitmap* LoadFromResource(int32 id);
2827
};
2928

30-
#endif // __BITMAPUTILS_H__
29+
#endif // __BITMAPUTILS_H__

Src/Headers/BubbleHelper.h

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
11
/*
22
3-
Bubblehelp class Copyright (C) 1998 Marco Nelissen <[email protected]>
4-
Freely usable in non-commercial applications, as long as proper credit
5-
is given.
3+
Bubblehelp class Copyright (C) 1998 Marco Nelissen <[email protected]>
4+
Freely usable in non-commercial applications, as long as proper credit
5+
is given.
66
7-
Usage:
7+
Usage:
88
- Add the file BubbleHelper.cpp to your project
99
- #include "BubbleHelper.h" in your files where needed
10-
- Create a single instance of BubbleHelper (it will serve your entire
11-
application). It is safe to create one on the stack or as a global.
12-
- Call SetHelp(view,text) for each view to which you wish to attach a text.
13-
- Use SetHelp(view,NULL) to remove text from a view.
14-
15-
This could be implemented as a BMessageFilter as well, but that means using
16-
one bubblehelp-instance for each window to which you wish to add help-bubbles.
17-
Using a single looping thread for everything turned out to be the most practical
18-
solution.
10+
- Create a single instance of BubbleHelper (it will serve your entire
11+
application). It is safe to create one on the stack or as a global.
12+
- Call SetHelp(view,text) for each view to which you wish to attach a text.
13+
- Use SetHelp(view,NULL) to remove text from a view.
14+
15+
This could be implemented as a BMessageFilter as well, but that means using
16+
one bubblehelp-instance for each window to which you wish to add help-bubbles.
17+
Using a single looping thread for everything turned out to be the most practical
18+
solution.
1919
2020
*/
2121

2222
#ifndef BUBBLE_HELPER_H
2323
#define BUBBLE_HELPER_H
2424

25+
#include <OS.h>
2526
#include <be/interface/Point.h>
26-
#include <be/interface/View.h>
2727
#include <be/interface/TextView.h>
28-
#include <OS.h>
28+
#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

0 commit comments

Comments
 (0)