/////////////////////////////////////////////////////////////////////////////
-// Name: minifram.h
+// Name: wx/gtk/minifram.h
// Purpose: wxMiniFrame class
// Author: Robert Roebling
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKMINIFRAMEH__
-#define __GTKMINIFRAMEH__
+#ifndef _WX_GTK_MINIFRAME_H_
+#define _WX_GTK_MINIFRAME_H_
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "wx/defs.h"
-#include "wx/object.h"
+#include "wx/bitmap.h"
#include "wx/frame.h"
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxMiniFrame;
-
//-----------------------------------------------------------------------------
// wxMiniFrame
//-----------------------------------------------------------------------------
-class wxMiniFrame: public wxFrame
+class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame
{
- DECLARE_DYNAMIC_CLASS(wxMiniFrame)
+ DECLARE_DYNAMIC_CLASS(wxMiniFrame)
public:
- inline wxMiniFrame(void) {}
- inline wxMiniFrame(wxWindow *parent,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ,
- const wxString& name = wxFrameNameStr)
- {
- Create(parent, id, title, pos, size, style, name);
- }
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME|wxTINY_CAPTION_HORIZ,
- const wxString& name = wxFrameNameStr);
-
- // implementation
-
- bool m_isDragging;
- int m_oldX,m_oldY;
- int m_diffX,m_diffY;
-
- void DrawFrame( int x, int y );
- void OnPaint( wxPaintEvent &event );
- void OnMouse( wxMouseEvent &event );
-
- DECLARE_EVENT_TABLE()
+ wxMiniFrame() {}
+ wxMiniFrame(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAPTION | wxRESIZE_BORDER,
+ const wxString& name = wxFrameNameStr)
+ {
+ Create(parent, id, title, pos, size, style, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAPTION | wxRESIZE_BORDER,
+ const wxString& name = wxFrameNameStr);
+
+ virtual void SetTitle( const wxString &title );
+
+protected:
+ virtual void DoSetSizeHints( int minW, int minH,
+ int maxW, int maxH,
+ int incW, int incH );
+ virtual void DoGetClientSize(int* width, int* height) const;
+
+ // implementation
+public:
+ bool m_isDragging;
+ int m_oldX,m_oldY;
+ int m_diffX,m_diffY;
+ wxBitmap m_closeButton;
+ int m_miniEdge;
+ int m_miniTitle;
};
-#endif
- // __GTKMINIFRAMEH__
+#endif // _WX_GTK_MINIFRAME_H_