Additional style fixes from Julun: adding back the virtual keyword, moving the

commas on class member initializers, fixing a typo. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22174 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood 2007-09-05 02:47:33 +00:00
parent 0d469404ed
commit b40c990627
10 changed files with 52 additions and 48 deletions

View File

@ -12,8 +12,8 @@
#include <Message.h>
ColorMenuItem::ColorMenuItem(const char *label, rgb_color color, BMessage *message)
: BMenuItem(label, message, 0, 0)
, fItemColor(color)
: BMenuItem(label, message, 0, 0),
fItemColor(color)
{
}

View File

@ -18,11 +18,14 @@ class BMessage;
class ColorMenuItem: public BMenuItem {
public:
ColorMenuItem(const char *label, rgb_color color, BMessage *message);
void DrawContent();
ColorMenuItem(const char *label, rgb_color color,
BMessage *message);
protected:
virtual void DrawContent();
private:
rgb_color fItemColor;
rgb_color fItemColor;
};
#endif // COLOR_MENU_ITEM_H

View File

@ -24,8 +24,8 @@ class FindWindow : public BWindow {
FindWindow(BRect frame, BHandler* handler, BString *searchString,
bool caseState, bool wrapState, bool backState);
void MessageReceived(BMessage* message);
void DispatchMessage(BMessage* message, BHandler* handler);
virtual void MessageReceived(BMessage* message);
virtual void DispatchMessage(BMessage* message, BHandler* handler);
private:
void _SendMessage();

View File

@ -116,8 +116,10 @@ ReplaceWindow::_ChangeUI()
fBackSearchBox->SetEnabled(fUIchange);
fReplaceButton->SetEnabled(fUIchange);
fUIchange ? fReplaceButton->MakeDefault(true)
: fReplaceAllButton->MakeDefault(true);
if (fUIchange)
fReplaceButton->MakeDefault(true);
else
fReplaceAllButton->MakeDefault(true);
fUIchange = !fUIchange;
}

View File

@ -24,12 +24,12 @@ class BTextControl;
class ReplaceWindow : public BWindow {
public:
ReplaceWindow(BRect frame, BHandler *_handler,
BString *searchString, BString *replaceString,
bool caseState, bool wrapState, bool backState);
ReplaceWindow(BRect frame, BHandler *_handler,
BString *searchString, BString *replaceString,
bool caseState, bool wrapState, bool backState);
void MessageReceived(BMessage* message);
void DispatchMessage(BMessage* message, BHandler *handler);
virtual void MessageReceived(BMessage* message);
virtual void DispatchMessage(BMessage* message, BHandler *handler);
private:
void _SendMessage(uint32 what);

View File

@ -79,8 +79,8 @@ namespace
StyledEditApp::StyledEditApp()
: BApplication(APP_SIGNATURE)
, fOpenPanel(NULL)
: BApplication(APP_SIGNATURE),
fOpenPanel(NULL)
{
fOpenPanel = new BFilePanel();
BMenuBar *menuBar =

View File

@ -24,29 +24,29 @@ class StyledEditWindow;
class StyledEditApp : public BApplication {
public:
StyledEditApp();
~StyledEditApp();
StyledEditApp();
virtual ~StyledEditApp();
void MessageReceived(BMessage *message);
void RefsReceived(BMessage *message);
void ReadyToRun();
virtual void MessageReceived(BMessage *message);
virtual void RefsReceived(BMessage *message);
virtual void ReadyToRun();
void DispatchMessage(BMessage *an_event, BHandler *handler);
virtual void DispatchMessage(BMessage *an_event, BHandler *handler);
int32 NumberOfWindows();
void OpenDocument();
void OpenDocument(entry_ref * ref);
void CloseDocument();
int32 NumberOfWindows();
void OpenDocument();
void OpenDocument(entry_ref *ref);
void CloseDocument();
private:
void ArgvReceivedEx(int32 argc, const char *argv[], const char * cwd);
void ArgvReceivedEx(int32 argc, const char *argv[], const char * cwd);
private:
BFilePanel *fOpenPanel;
BMenu *fOpenPanelEncodingMenu;
uint32 fOpenAsEncoding;
int32 fWindowCount;
int32 fNextUntitledWindow;
BFilePanel *fOpenPanel;
BMenu *fOpenPanelEncodingMenu;
uint32 fOpenAsEncoding;
int32 fWindowCount;
int32 fNextUntitledWindow;
};

View File

@ -17,16 +17,20 @@
class BFile;
class BHandler;
class BMessanger;
class BMessenger;
class StyledEditView : public BTextView {
public:
StyledEditView(BRect viewframe, BRect textframe,
BHandler *handler);
~StyledEditView();
StyledEditView(BRect viewframe, BRect textframe,
BHandler *handler);
virtual ~StyledEditView();
void Select(int32 start, int32 finish);
virtual void Select(int32 start, int32 finish);
virtual void DeleteText(int32 start, int32 finish);
virtual void FrameResized(float width, float height);
virtual void InsertText(const char *text, int32 length, int32 offset,
const text_run_array *runs = NULL);
void Reset();
status_t GetStyledText(BPositionIO * stream);
@ -36,11 +40,6 @@ class StyledEditView : public BTextView {
uint32 GetEncoding() const;
private:
void DeleteText(int32 start, int32 finish);
void FrameResized(float width, float height);
void InsertText(const char *text, int32 length, int32 offset,
const text_run_array *runs = NULL);
BMessenger *fMessenger;
bool fSuppressChanges;
BString fEncoding;

View File

@ -29,11 +29,11 @@
#include <MenuItem.h>
#include <PrintJob.h>
#include <Rect.h>
#include <Roster.h>
#include <ScrollView.h>
#include <TextControl.h>
#include <TextView.h>
#include <TranslationUtils.h>
#include <Roster.h>
#include <stdlib.h>

View File

@ -30,12 +30,12 @@ class StyledEditWindow : public BWindow {
public:
StyledEditWindow(BRect frame, int32 id, uint32 encoding = 0);
StyledEditWindow(BRect frame, entry_ref *ref, uint32 encoding = 0);
~StyledEditWindow();
virtual ~StyledEditWindow();
void Quit();
bool QuitRequested();
void MessageReceived(BMessage *message);
void MenusBeginning();
virtual void Quit();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage *message);
virtual void MenusBeginning();
status_t Save(BMessage *message = 0);
status_t SaveAs(BMessage *message = 0);