/* * Copyright 1999 Kelvin W Sherlock * * $Id: main_window.h,v 1.9 1999/04/17 19:00:33 baron Exp baron $ * * * */ #include #include #include #include #include #include #include "LoadMidi.h" #include "TrackList.h" #include "TrackListList.h" #include "MyListView.h" //class BPopUpMenu; enum { LIST_INVOKE = 'invk', MENU_NEW_TRACK = 'ntrk', MENU_COPYRIGHT = 'cpyr', MENU_UNDO = 'undo', MENU_CUT = 'cut_', MENU_COPY = 'copy', MENU_PASTE = 'past', MENU_CLEAR = 'clea', MENU_QUIT = 'quit', MENU_CLOSE = 'clos', MENU_SAVE = 'save', MENU_SAVE_AS = 's_as', MENU_NEW = 'new_', MENU_OPEN = 'open', POP_MENU = 'pop_', MENU_DELETE_TRACK = 'dele', MENU_TRANSPOSE_TRACK = 'tran', }; class Main_Window: public BWindow { public: Main_Window(BRect , const char *window_title); Main_Window(BRect, entry_ref *ref); ~Main_Window(); bool DoClose(void); bool DoSave(void); /* * Call this to make it open a file */ bool OpenFile(entry_ref *); /* * overloaded functions * */ virtual void Quit(void); virtual void FrameResized(float width, float height); virtual void MessageReceived(BMessage *); virtual bool QuitRequested(void); //virtual void MouseDown(BPoint where); protected: private: void InitWindow(void); BFilePanel *OpenPanel; BFilePanel *SavePanel; //BPopUpMenu *PopUp; bool dirtyFlag; BView *background; MyListView *ListView; //TrackListList *Tracks; static int __Count; // number of total active main windows };