2006-03-27 06:48:24 +00:00
|
|
|
/*
|
2008-01-10 21:05:00 +00:00
|
|
|
* Copyright 2004-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2006-03-27 06:48:24 +00:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2004-02-10 15:34:29 +00:00
|
|
|
#ifndef PROBE_VIEW_H
|
|
|
|
#define PROBE_VIEW_H
|
|
|
|
|
|
|
|
|
2004-02-12 03:09:22 +00:00
|
|
|
#include "DataEditor.h"
|
|
|
|
|
2004-02-10 15:34:29 +00:00
|
|
|
#include <View.h>
|
2004-02-10 20:10:13 +00:00
|
|
|
#include <String.h>
|
2004-02-10 15:34:29 +00:00
|
|
|
#include <Path.h>
|
|
|
|
|
2004-02-10 20:10:13 +00:00
|
|
|
|
|
|
|
class BScrollView;
|
2004-02-24 03:39:23 +00:00
|
|
|
class BMenuItem;
|
2006-03-27 06:48:24 +00:00
|
|
|
class BMenu;
|
2004-02-10 15:34:29 +00:00
|
|
|
|
|
|
|
class HeaderView;
|
2004-02-12 04:21:33 +00:00
|
|
|
class DataView;
|
2004-02-28 04:10:48 +00:00
|
|
|
class EditorLooper;
|
2004-02-10 15:34:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ProbeView : public BView {
|
|
|
|
public:
|
2008-01-10 21:05:00 +00:00
|
|
|
ProbeView(BRect rect, entry_ref* ref, const char* attribute = NULL,
|
|
|
|
const BMessage* settings = NULL);
|
2004-02-10 15:34:29 +00:00
|
|
|
virtual ~ProbeView();
|
|
|
|
|
2004-02-12 03:09:22 +00:00
|
|
|
virtual void DetachedFromWindow();
|
2004-02-10 15:34:29 +00:00
|
|
|
virtual void AttachedToWindow();
|
2004-02-18 03:34:10 +00:00
|
|
|
virtual void AllAttached();
|
2004-02-18 14:31:23 +00:00
|
|
|
virtual void WindowActivated(bool active);
|
2008-01-10 21:05:00 +00:00
|
|
|
virtual void MessageReceived(BMessage* message);
|
2004-02-10 15:34:29 +00:00
|
|
|
|
2008-01-10 21:05:00 +00:00
|
|
|
void AddSaveMenuItems(BMenu* menu, int32 index);
|
|
|
|
void AddPrintMenuItems(BMenu* menu, int32 index);
|
|
|
|
void AddViewAsMenuItems();
|
2004-02-10 20:10:13 +00:00
|
|
|
|
2004-02-12 04:21:33 +00:00
|
|
|
void UpdateSizeLimits();
|
2004-02-26 19:15:37 +00:00
|
|
|
bool QuitRequested();
|
2004-02-12 04:21:33 +00:00
|
|
|
|
2008-01-10 21:05:00 +00:00
|
|
|
DataEditor& Editor() { return fEditor; }
|
2004-02-24 16:59:15 +00:00
|
|
|
|
2004-02-10 15:34:29 +00:00
|
|
|
private:
|
2008-01-10 21:05:00 +00:00
|
|
|
void _UpdateAttributesMenu(BMenu* menu);
|
|
|
|
void _UpdateSelectionMenuItems(int64 start, int64 end);
|
|
|
|
void _UpdateBookmarkMenuItems();
|
|
|
|
void _AddBookmark(off_t position);
|
|
|
|
void _RemoveTypeEditor();
|
|
|
|
void _SetTypeEditor(int32 index);
|
|
|
|
void _CheckClipboard();
|
|
|
|
status_t _PageSetup();
|
|
|
|
void _Print();
|
|
|
|
status_t _Save();
|
2004-02-24 03:39:23 +00:00
|
|
|
|
2004-02-12 03:09:22 +00:00
|
|
|
DataEditor fEditor;
|
2008-01-10 21:05:00 +00:00
|
|
|
EditorLooper* fEditorLooper;
|
|
|
|
HeaderView* fHeaderView;
|
|
|
|
DataView* fDataView;
|
|
|
|
BScrollView* fScrollView;
|
|
|
|
BMenuItem* fPasteMenuItem;
|
|
|
|
BMenuItem* fUndoMenuItem;
|
|
|
|
BMenuItem* fRedoMenuItem;
|
|
|
|
BMenuItem* fNativeMenuItem;
|
|
|
|
BMenuItem* fSwappedMenuItem;
|
|
|
|
BMenuItem* fSaveMenuItem;
|
|
|
|
BMessage* fPrintSettings;
|
|
|
|
BMenu* fBookmarkMenu;
|
|
|
|
BView* fTypeView;
|
|
|
|
|
|
|
|
BMenuItem* fFindAgainMenuItem;
|
|
|
|
const uint8* fLastSearch;
|
2004-02-28 04:10:48 +00:00
|
|
|
size_t fLastSearchSize;
|
2004-02-10 15:34:29 +00:00
|
|
|
};
|
|
|
|
|
2004-02-12 03:09:22 +00:00
|
|
|
#endif /* PROBE_VIEW_H */
|