156aa406aSAxel Dörfler /* 2*e85413adSAxel Dörfler * Copyright 2004-2018, Axel Dörfler, axeld@pinc-software.de. 3*e85413adSAxel Dörfler * All rights reserved. Distributed under the terms of the MIT license. 456aa406aSAxel Dörfler */ 556aa406aSAxel Dörfler #ifndef PROBE_VIEW_H 656aa406aSAxel Dörfler #define PROBE_VIEW_H 756aa406aSAxel Dörfler 856aa406aSAxel Dörfler 9bc005359SAxel Dörfler #include "DataEditor.h" 10bc005359SAxel Dörfler 1156aa406aSAxel Dörfler #include <View.h> 12416271b7SAxel Dörfler #include <String.h> 1356aa406aSAxel Dörfler #include <Path.h> 1456aa406aSAxel Dörfler 15416271b7SAxel Dörfler 16416271b7SAxel Dörfler class BScrollView; 17cf547998SAxel Dörfler class BMenuItem; 186f850dfdSAxel Dörfler class BMenu; 1956aa406aSAxel Dörfler 2056aa406aSAxel Dörfler class HeaderView; 2190828ad1SAxel Dörfler class DataView; 228db24919SAxel Dörfler class EditorLooper; 2356aa406aSAxel Dörfler 2456aa406aSAxel Dörfler 2556aa406aSAxel Dörfler class ProbeView : public BView { 2656aa406aSAxel Dörfler public: 27*e85413adSAxel Dörfler ProbeView(entry_ref* ref, 28*e85413adSAxel Dörfler const char* attribute = NULL, 297fff3ed0SAxel Dörfler const BMessage* settings = NULL); 3056aa406aSAxel Dörfler virtual ~ProbeView(); 3156aa406aSAxel Dörfler 32bc005359SAxel Dörfler virtual void DetachedFromWindow(); 3356aa406aSAxel Dörfler virtual void AttachedToWindow(); 345475e6e5SAxel Dörfler virtual void AllAttached(); 35d556aa00SAxel Dörfler virtual void WindowActivated(bool active); 3656aa406aSAxel Dörfler virtual void MessageReceived(BMessage* message); 3756aa406aSAxel Dörfler 386781cbdcSAxel Dörfler void AddSaveMenuItems(BMenu* menu, int32 index); 396781cbdcSAxel Dörfler void AddPrintMenuItems(BMenu* menu, int32 index); 4058e5eff9SAxel Dörfler void AddViewAsMenuItems(); 41416271b7SAxel Dörfler 420adaff85SAxel Dörfler bool QuitRequested(); 4390828ad1SAxel Dörfler Editor()44d426c2b9SAxel Dörfler DataEditor& Editor() { return fEditor; } 45d426c2b9SAxel Dörfler 4656aa406aSAxel Dörfler private: 4758e5eff9SAxel Dörfler void _UpdateAttributesMenu(BMenu* menu); 48*e85413adSAxel Dörfler void _UpdateSelectionMenuItems(int64 start, 49*e85413adSAxel Dörfler int64 end); 5058e5eff9SAxel Dörfler void _UpdateBookmarkMenuItems(); 5158e5eff9SAxel Dörfler void _AddBookmark(off_t position); 5258e5eff9SAxel Dörfler void _RemoveTypeEditor(); 5358e5eff9SAxel Dörfler void _SetTypeEditor(int32 index); 5458e5eff9SAxel Dörfler void _CheckClipboard(); 5558e5eff9SAxel Dörfler status_t _PageSetup(); 5658e5eff9SAxel Dörfler void _Print(); 5758e5eff9SAxel Dörfler status_t _Save(); 58cf547998SAxel Dörfler 59*e85413adSAxel Dörfler private: 60bc005359SAxel Dörfler DataEditor fEditor; 618db24919SAxel Dörfler EditorLooper* fEditorLooper; 6256aa406aSAxel Dörfler HeaderView* fHeaderView; 6390828ad1SAxel Dörfler DataView* fDataView; 64416271b7SAxel Dörfler BScrollView* fScrollView; 65cf547998SAxel Dörfler BMenuItem* fPasteMenuItem; 6658e5eff9SAxel Dörfler BMenuItem* fUndoMenuItem; 6758e5eff9SAxel Dörfler BMenuItem* fRedoMenuItem; 6858e5eff9SAxel Dörfler BMenuItem* fNativeMenuItem; 6958e5eff9SAxel Dörfler BMenuItem* fSwappedMenuItem; 70c4473afbSAxel Dörfler BMenuItem* fSaveMenuItem; 7112464085SAxel Dörfler BMessage* fPrintSettings; 72fe8682eaSAxel Dörfler BMenu* fBookmarkMenu; 7358e5eff9SAxel Dörfler BView* fTypeView; 748db24919SAxel Dörfler 758db24919SAxel Dörfler BMenuItem* fFindAgainMenuItem; 768db24919SAxel Dörfler const uint8* fLastSearch; 778db24919SAxel Dörfler size_t fLastSearchSize; 7856aa406aSAxel Dörfler }; 7956aa406aSAxel Dörfler 80*e85413adSAxel Dörfler 81bc005359SAxel Dörfler #endif /* PROBE_VIEW_H */ 82