Files
haiku-beta6/src/prefs/keymap/KeymapWindow.h
T

69 lines
1.7 KiB
C++
Raw Normal View History

2002-07-09 12:24:59 +00:00
#ifndef OBOS_KEYMAP_WINDOW_H
#define OBOS_KEYMAP_WINDOW_H
#include <interface/Window.h>
#include <support/List.h>
#include <interface/MenuBar.h>
2002-07-09 12:24:59 +00:00
#if !DEBUG
#define WINDOW_TITLE "Keymap"
#else
#define WINDOW_TITLE "OBOS Keymap"
#endif //DEBUG
#define WINDOW_LEFT_TOP_POSITION BPoint( 80, 25 )
#define WINDOW_DIMENSIONS BRect( 0,0, 612,256 )
class KeymapListItem;
class KeymapApplication;
2004-07-04 18:34:17 +00:00
class MapView : public BView
{
public:
MapView(BRect rect, const char *name);
void Draw(BRect rect);
void DrawKey(BRect rect, bool pressed, bool vertical = false);
void DrawBorder(BRect borderRect);
//void Pulse();
void AttachedToWindow();
void KeyDown(const char* bytes, int32 numBytes);
void KeyUp(const char* bytes, int32 numBytes);
void MessageReceived(BMessage *msg);
2004-07-04 20:16:21 +00:00
key_info fOldKeyInfo;
2004-07-04 18:34:17 +00:00
};
2002-07-09 12:24:59 +00:00
class KeymapWindow : public BWindow {
public:
KeymapWindow( BRect frame );
bool QuitRequested();
void MessageReceived( BMessage* message );
//void AllAttached();
2002-07-09 12:24:59 +00:00
protected:
KeymapApplication *fApplication;
BView *fPlaceholderView;
BListView *fSystemListView;
BListView *fUserListView;
// the map that's currently highlighted
BEntry *fSelectedMap;
BButton *fUseButton;
BButton *fRevertButton;
const char *title;
2004-07-04 18:34:17 +00:00
MapView *fMapView;
2002-07-09 12:24:59 +00:00
BMenuBar *AddMenuBar();
void AddMaps();
BList *ListItemsFromEntryList( BList * entryList);
KeymapListItem* ItemFromEntry( BEntry *entry );
void HandleSystemMapSelected( BMessage* );
void HandleUserMapSelected( BMessage* );
void HandleMapSelected( BMessage *selectionMessage,
BListView * selectedView, BListView * otherView );
void UseKeymap();
};
#endif // OBOS_KEYMAP_WINDOW_H