* 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 { class StyledEditWindow : public BWindow {
public: public:
StyledEditWindow(BRect frame, int32 id, uint32 encoding = 0); StyledEditWindow(BRect frame, int32 id,
StyledEditWindow(BRect frame, entry_ref *ref, uint32 encoding = 0); uint32 encoding = 0);
virtual ~StyledEditWindow(); StyledEditWindow(BRect frame, entry_ref* ref,
uint32 encoding = 0);
virtual ~StyledEditWindow();
virtual void Quit(); virtual void Quit();
virtual bool QuitRequested(); virtual bool QuitRequested();
virtual void MessageReceived(BMessage *message); virtual void MessageReceived(BMessage* message);
virtual void MenusBeginning(); virtual void MenusBeginning();
status_t Save(BMessage *message = 0); status_t Save(BMessage* message = NULL);
status_t SaveAs(BMessage *message = 0); status_t SaveAs(BMessage* message = NULL);
void OpenFile(entry_ref *ref); void OpenFile(entry_ref* ref);
status_t PageSetup(const char *documentname); status_t PageSetup(const char* documentName);
void Print(const char *documentname); void Print(const char* documentName);
void SearchAllWindows(BString find, BString replace, bool casesens); void SearchAllWindows(BString find, BString replace,
bool IsDocumentEntryRef(const entry_ref *ref); bool caseSensitive);
bool IsDocumentEntryRef(const entry_ref* ref);
private: private:
void InitWindow(uint32 encoding = 0); void _InitWindow(uint32 encoding = 0);
void LoadAttrs(); void _LoadAttrs();
void SaveAttrs(); void _SaveAttrs();
bool Search(BString searchfor, bool casesens, bool wrap, bool backsearch); status_t _LoadFile(entry_ref* ref);
void FindSelection(); void _RevertToSaved();
bool Replace(BString findthis, BString replacewith, bool casesens, bool _Search(BString searchFor, bool caseSensitive,
bool wrap, bool backsearch); bool wrap, bool backSearch);
void ReplaceAll(BString find, BString replace, bool casesens); void _FindSelection();
void SetFontSize(float fontSize); bool _Replace(BString findThis, BString replaceWith,
void SetFontColor(const rgb_color *color); bool caseSensitive, bool wrap,
void SetFontStyle(const char *fontFamily, const char *fontStyle); bool backSearch);
int32 _ShowStatistics(); void _ReplaceAll(BString find, BString replace,
status_t _LoadFile(entry_ref* ref); bool caseSensitive);
void RevertToSaved(); void _SetFontSize(float fontSize);
void _UpdateCleanUndoRedoSaveRevert(); void _SetFontColor(const rgb_color* color);
int32 _ShowAlert(const BString& text, const BString& label, void _SetFontStyle(const char* fontFamily,
const BString& label2, const BString& label3, const char* fontStyle);
alert_type type) const; int32 _ShowStatistics();
void _UpdateCleanUndoRedoSaveRevert();
int32 _ShowAlert(const BString& text,
const BString& label, const BString& label2,
const BString& label3,
alert_type type) const;
BMenuBar *fMenuBar; private:
BMessage *fPrintSettings; BMenuBar* fMenuBar;
BMessage *fSaveMessage; BMessage* fPrintSettings;
BMenu *fRecentMenu; BMessage* fSaveMessage;
BMenu* fRecentMenu;
BMenu *fFontMenu; BMenu* fFontMenu;
BMenu *fFontSizeMenu; BMenu* fFontSizeMenu;
BMenu *fFontColorMenu; BMenu* fFontColorMenu;
BMenuItem *fCurrentFontItem; BMenuItem* fCurrentFontItem;
BMenuItem *fCurrentStyleItem; BMenuItem* fCurrentStyleItem;
BMenuItem *fSaveItem; BMenuItem* fSaveItem;
BMenuItem *fRevertItem; BMenuItem* fRevertItem;
BMenuItem *fUndoItem; BMenuItem* fUndoItem;
BMenuItem *fCutItem; BMenuItem* fCutItem;
BMenuItem *fCopyItem; BMenuItem* fCopyItem;
BMenuItem *fClearItem; BMenuItem* fClearItem;
BMenuItem *fFindAgainItem; BMenuItem* fFindAgainItem;
BMenuItem *fReplaceSameItem; BMenuItem* fReplaceSameItem;
BMenuItem *fBlackItem; BMenuItem* fBlackItem;
BMenuItem *fRedItem; BMenuItem* fRedItem;
BMenuItem *fGreenItem; BMenuItem* fGreenItem;
BMenuItem *fBlueItem; BMenuItem* fBlueItem;
BMenuItem *fCyanItem; BMenuItem* fCyanItem;
BMenuItem *fMagentaItem; BMenuItem* fMagentaItem;
BMenuItem *fYellowItem; BMenuItem* fYellowItem;
BMenuItem *fWrapItem; BMenuItem* fWrapItem;
BMenuItem *fAlignLeft; BMenuItem* fAlignLeft;
BMenuItem *fAlignCenter; BMenuItem* fAlignCenter;
BMenuItem *fAlignRight; BMenuItem* fAlignRight;
BString fStringToFind; BString fStringToFind;
BString fReplaceString; BString fReplaceString;
// undo modes // undo modes
bool fUndoFlag; // we just did an undo action bool fUndoFlag; // we just did an undo action
bool fCanUndo; // we can do an undo action next bool fCanUndo; // we can do an undo action next
bool fRedoFlag; // we just did a redo action bool fRedoFlag; // we just did a redo action
bool fCanRedo; // we can do a redo action next bool fCanRedo; // we can do a redo action next
// clean modes // clean modes
bool fUndoCleans; // an undo action will put us in a clean state bool fUndoCleans;
bool fRedoCleans; // a redo action will put us in a clean state // an undo action will put us in a clean state
bool fClean; // we are 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 fCaseSensitive;
bool fWrapAround; bool fWrapAround;
bool fBackSearch; bool fBackSearch;
StyledEditView *fTextView; StyledEditView* fTextView;
BScrollView *fScrollView; BScrollView* fScrollView;
BFilePanel *fSavePanel; BFilePanel* fSavePanel;
BMenu *fSavePanelEncodingMenu; BMenu* fSavePanelEncodingMenu;
}; };