wxWidgets/include/wx/osx/statusbr.h
Václav Slavík 634f60ff23 Remove redundant code from wxStatusBarMac
Remove a lot of Mac-specific code from wxStatusBarMac in favour of using
shared wxStatusBarGeneric:

- Now that wxFRAME_EX_METAL aka NSWindowStyleMaskTexturedBackground
  doesn’t affect text placement, there’s no reason for customized
  DrawFieldText(). As a side effect of this removal, ellipsizing fields
  is now supported.

- Remove customized DoUpdateStatusText() code that is no longer needed.

See https://github.com/wxWidgets/wxWidgets/pull/2160#pullrequestreview-563916013
2021-01-16 18:30:55 +01:00

46 lines
1.4 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/statusbr.h
// Purpose: native implementation of wxStatusBar.
// Optional: can use generic version instead.
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_STATBAR_H_
#define _WX_STATBAR_H_
class WXDLLIMPEXP_CORE wxStatusBarMac : public wxStatusBarGeneric
{
public:
wxStatusBarMac();
wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY,
long style = wxSTB_DEFAULT_STYLE,
const wxString& name = wxASCII_STR(wxStatusBarNameStr));
virtual ~wxStatusBarMac();
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
long style = wxSTB_DEFAULT_STYLE,
const wxString& name = wxASCII_STR(wxStatusBarNameStr));
// Implementation
virtual void MacHiliteChanged() wxOVERRIDE;
void OnPaint(wxPaintEvent& event);
protected:
virtual int GetEffectiveFieldStyle(int WXUNUSED(i)) const wxOVERRIDE { return wxSB_NORMAL; }
virtual void InitColours() wxOVERRIDE;
private:
wxColour m_textActive, m_textInactive;
wxDECLARE_DYNAMIC_CLASS(wxStatusBarMac);
wxDECLARE_EVENT_TABLE();
};
#endif // _WX_STATBAR_H_