1 /* 2 * Copyright 2002-2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Mattias Sundblad 7 * Andrew Bachmann 8 */ 9 #ifndef REPLACE_WINDOW_H 10 #define REPLACE_WINDOW_H 11 12 13 #include <Window.h> 14 #include <Rect.h> 15 #include <Handler.h> 16 #include <String.h> 17 #include <Message.h> 18 #include <View.h> 19 #include <TextControl.h> 20 #include <CheckBox.h> 21 #include <Button.h> 22 23 24 class ReplaceWindow : public BWindow { 25 public: 26 ReplaceWindow(BRect frame, BHandler *_handler,BString *searchString, 27 BString *replaceString, bool *caseState, bool *wrapState, bool *backState); 28 29 virtual void MessageReceived(BMessage* message); 30 virtual void DispatchMessage(BMessage* message, BHandler *handler); 31 32 private: 33 void _SendMessage(uint32 what); 34 void _ChangeUI(); 35 36 BView *fReplaceView; 37 BTextControl *fSearchString; 38 BTextControl *fReplaceString; 39 BCheckBox *fCaseSensBox; 40 BCheckBox *fWrapBox; 41 BCheckBox *fBackSearchBox; 42 BCheckBox *fAllWindowsBox; 43 BButton *fReplaceButton; 44 BButton *fReplaceAllButton; 45 BButton *fCancelButton; 46 BHandler *fHandler; 47 bool fUIchange; 48 }; 49 50 #endif // REPLACE_WINDOW_H 51