* Renamed private methhods to have an underscore prefix.

* Ordered methods as they are declared in the header.
* Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39549 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-11-20 21:03:50 +00:00
parent 34dc99625d
commit 5188c282ad
2 changed files with 760 additions and 747 deletions
File diff suppressed because it is too large Load Diff
+91 -80
View File
@@ -29,102 +29,113 @@ class StyledEditView;
class StyledEditWindow : public BWindow {
public:
StyledEditWindow(BRect frame, int32 id, uint32 encoding = 0);
StyledEditWindow(BRect frame, entry_ref *ref, uint32 encoding = 0);
virtual ~StyledEditWindow();
public:
StyledEditWindow(BRect frame, int32 id,
uint32 encoding = 0);
StyledEditWindow(BRect frame, entry_ref* ref,
uint32 encoding = 0);
virtual ~StyledEditWindow();
virtual void Quit();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage *message);
virtual 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);
void OpenFile(entry_ref *ref);
status_t PageSetup(const char *documentname);
void Print(const char *documentname);
void SearchAllWindows(BString find, BString replace, bool casesens);
bool IsDocumentEntryRef(const entry_ref *ref);
status_t Save(BMessage* message = NULL);
status_t SaveAs(BMessage* message = NULL);
void OpenFile(entry_ref* ref);
status_t PageSetup(const char* documentName);
void Print(const char* documentName);
void SearchAllWindows(BString find, BString replace,
bool caseSensitive);
bool IsDocumentEntryRef(const entry_ref* ref);
private:
void InitWindow(uint32 encoding = 0);
void LoadAttrs();
void SaveAttrs();
bool Search(BString searchfor, bool casesens, bool wrap, bool backsearch);
void FindSelection();
bool Replace(BString findthis, BString replacewith, bool casesens,
bool wrap, bool backsearch);
void ReplaceAll(BString find, BString replace, bool casesens);
void SetFontSize(float fontSize);
void SetFontColor(const rgb_color *color);
void SetFontStyle(const char *fontFamily, const char *fontStyle);
int32 _ShowStatistics();
status_t _LoadFile(entry_ref* ref);
void RevertToSaved();
void _UpdateCleanUndoRedoSaveRevert();
int32 _ShowAlert(const BString& text, const BString& label,
const BString& label2, const BString& label3,
alert_type type) const;
private:
void _InitWindow(uint32 encoding = 0);
void _LoadAttrs();
void _SaveAttrs();
status_t _LoadFile(entry_ref* ref);
void _RevertToSaved();
bool _Search(BString searchFor, bool caseSensitive,
bool wrap, bool backSearch);
void _FindSelection();
bool _Replace(BString findThis, BString replaceWith,
bool caseSensitive, bool wrap,
bool backSearch);
void _ReplaceAll(BString find, BString replace,
bool caseSensitive);
void _SetFontSize(float fontSize);
void _SetFontColor(const rgb_color* color);
void _SetFontStyle(const char* fontFamily,
const char* fontStyle);
int32 _ShowStatistics();
void _UpdateCleanUndoRedoSaveRevert();
int32 _ShowAlert(const BString& text,
const BString& label, const BString& label2,
const BString& label3,
alert_type type) const;
BMenuBar *fMenuBar;
BMessage *fPrintSettings;
BMessage *fSaveMessage;
BMenu *fRecentMenu;
private:
BMenuBar* fMenuBar;
BMessage* fPrintSettings;
BMessage* fSaveMessage;
BMenu* fRecentMenu;
BMenu *fFontMenu;
BMenu *fFontSizeMenu;
BMenu *fFontColorMenu;
BMenuItem *fCurrentFontItem;
BMenuItem *fCurrentStyleItem;
BMenu* fFontMenu;
BMenu* fFontSizeMenu;
BMenu* fFontColorMenu;
BMenuItem* fCurrentFontItem;
BMenuItem* fCurrentStyleItem;
BMenuItem *fSaveItem;
BMenuItem *fRevertItem;
BMenuItem* fSaveItem;
BMenuItem* fRevertItem;
BMenuItem *fUndoItem;
BMenuItem *fCutItem;
BMenuItem *fCopyItem;
BMenuItem *fClearItem;
BMenuItem* fUndoItem;
BMenuItem* fCutItem;
BMenuItem* fCopyItem;
BMenuItem* fClearItem;
BMenuItem *fFindAgainItem;
BMenuItem *fReplaceSameItem;
BMenuItem* fFindAgainItem;
BMenuItem* fReplaceSameItem;
BMenuItem *fBlackItem;
BMenuItem *fRedItem;
BMenuItem *fGreenItem;
BMenuItem *fBlueItem;
BMenuItem *fCyanItem;
BMenuItem *fMagentaItem;
BMenuItem *fYellowItem;
BMenuItem* fBlackItem;
BMenuItem* fRedItem;
BMenuItem* fGreenItem;
BMenuItem* fBlueItem;
BMenuItem* fCyanItem;
BMenuItem* fMagentaItem;
BMenuItem* fYellowItem;
BMenuItem *fWrapItem;
BMenuItem *fAlignLeft;
BMenuItem *fAlignCenter;
BMenuItem *fAlignRight;
BMenuItem* fWrapItem;
BMenuItem* fAlignLeft;
BMenuItem* fAlignCenter;
BMenuItem* fAlignRight;
BString fStringToFind;
BString fReplaceString;
BString fStringToFind;
BString fReplaceString;
// undo modes
bool fUndoFlag; // we just did an undo action
bool fCanUndo; // we can do an undo action next
bool fRedoFlag; // we just did a redo action
bool fCanRedo; // we can do a redo action next
// undo modes
bool fUndoFlag; // we just did an undo action
bool fCanUndo; // we can do an undo action next
bool fRedoFlag; // we just did a redo action
bool fCanRedo; // we can do a redo action next
// clean modes
bool fUndoCleans; // an undo action will put us in a clean state
bool fRedoCleans; // a redo action will put us in a clean state
bool fClean; // we are in a clean state
// clean modes
bool fUndoCleans;
// an undo action will put us in a clean state
bool fRedoCleans;
// a redo action will put us in a clean state
bool fClean; // we are in a clean state
bool fCaseSens;
bool fWrapAround;
bool fBackSearch;
bool fCaseSensitive;
bool fWrapAround;
bool fBackSearch;
StyledEditView *fTextView;
BScrollView *fScrollView;
StyledEditView* fTextView;
BScrollView* fScrollView;
BFilePanel *fSavePanel;
BMenu *fSavePanelEncodingMenu;
BFilePanel* fSavePanel;
BMenu* fSavePanelEncodingMenu;
};