1 /* 2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 #ifndef PROBE_VIEW_H 6 #define PROBE_VIEW_H 7 8 9 #include "DataEditor.h" 10 11 #include <View.h> 12 #include <String.h> 13 #include <Path.h> 14 15 16 class BScrollView; 17 class BMenuItem; 18 19 class HeaderView; 20 class DataView; 21 class EditorLooper; 22 23 24 class ProbeView : public BView { 25 public: 26 ProbeView(BRect rect, entry_ref *ref, const char *attribute = NULL, 27 const BMessage *settings = NULL); 28 virtual ~ProbeView(); 29 30 virtual void DetachedFromWindow(); 31 virtual void AttachedToWindow(); 32 virtual void AllAttached(); 33 virtual void WindowActivated(bool active); 34 virtual void MessageReceived(BMessage *message); 35 36 void AddSaveMenuItems(BMenu *menu, int32 index); 37 void AddPrintMenuItems(BMenu *menu, int32 index); 38 39 void UpdateSizeLimits(); 40 bool QuitRequested(); 41 42 DataEditor &Editor() { return fEditor; } 43 44 private: 45 void UpdateAttributesMenu(BMenu *menu); 46 void UpdateSelectionMenuItems(int64 start, int64 end); 47 void UpdateBookmarkMenuItems(); 48 void AddBookmark(off_t position); 49 void CheckClipboard(); 50 status_t PageSetup(); 51 void Print(); 52 status_t Save(); 53 54 DataEditor fEditor; 55 EditorLooper *fEditorLooper; 56 HeaderView *fHeaderView; 57 DataView *fDataView; 58 BScrollView *fScrollView; 59 BMenuItem *fPasteMenuItem; 60 BMenuItem *fUndoMenuItem, *fRedoMenuItem; 61 BMenuItem *fNativeMenuItem, *fSwappedMenuItem; 62 BMenuItem *fSaveMenuItem; 63 BMessage *fPrintSettings; 64 BMenu *fBookmarkMenu; 65 66 BMenuItem *fFindAgainMenuItem; 67 const uint8 *fLastSearch; 68 size_t fLastSearchSize; 69 }; 70 71 #endif /* PROBE_VIEW_H */ 72