finalcut/src/fmenubar.h

56 lines
1.3 KiB
C
Raw Normal View History

// fmenubar.h
// class FMenuBar
#ifndef _FMENUBAR_H
#define _FMENUBAR_H
#include "fwindow.h"
#include "fmenulist.h"
//----------------------------------------------------------------------
// class FMenuBar
//----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuBar : public FWindow, public FMenuList
{
private:
bool mouse_down;
int x;
private:
FMenuBar (const FMenuBar&);
FMenuBar& operator = (const FMenuBar&);
void init();
2015-08-16 20:05:39 +02:00
bool isMenu (FMenuItem*) const;
int getHotkeyPos (wchar_t*&, wchar_t*&, uInt);
void draw();
void drawItems();
void adjustSize();
public:
explicit FMenuBar (FWidget* parent=0); // constructor
virtual ~FMenuBar(); // destructor
virtual const char* getClassName() const;
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void hide();
2015-09-22 04:18:20 +02:00
// make every setGeometry from FWidget available
using FWidget::setGeometry;
void setGeometry (int, int, int, int, bool adjust=true);
2015-08-16 20:05:39 +02:00
void cb_item_activated (FWidget*, void*);
};
#pragma pack(pop)
// FMenuBar inline functions
//----------------------------------------------------------------------
inline const char* FMenuBar::getClassName() const
{ return "FMenuBar"; }
#endif // _FMENUBAR_H