mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed build on OSX & Linux
This commit is contained in:
parent
780b5667f3
commit
18a6205738
3 changed files with 27 additions and 16 deletions
|
@ -36,6 +36,8 @@
|
||||||
#define ENABLE_REMOVE_TABS_FROM_PLATER (1 && ENABLE_1_42_0)
|
#define ENABLE_REMOVE_TABS_FROM_PLATER (1 && ENABLE_1_42_0)
|
||||||
// Constrains the camera target into the scene bounding box
|
// Constrains the camera target into the scene bounding box
|
||||||
#define ENABLE_CONSTRAINED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
#define ENABLE_CONSTRAINED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
||||||
|
// Use wxDataViewRender instead of wxDataViewCustomRenderer
|
||||||
|
#define ENABLE_NONCUSTOM_DATA_VIEW_RENDERING (0 && ENABLE_1_42_0)
|
||||||
|
|
||||||
#endif // _technologies_h_
|
#endif // _technologies_h_
|
||||||
|
|
||||||
|
|
|
@ -1228,14 +1228,6 @@ void PrusaObjectDataViewModel::SetVolumeType(const wxDataViewItem &item, const i
|
||||||
ItemChanged(item);
|
ItemChanged(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrusaBitmapTextRenderer::PrusaBitmapTextRenderer(wxDataViewCellMode mode /*= wxDATAVIEW_CELL_EDITABLE*/,
|
|
||||||
int align /*= wxDVR_DEFAULT_ALIGNMENT*/):
|
|
||||||
wxDataViewRenderer(wxT("PrusaDataViewBitmapText"), mode, align)
|
|
||||||
{
|
|
||||||
SetMode(mode);
|
|
||||||
SetAlignment(align);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// PrusaDataViewBitmapText
|
// PrusaDataViewBitmapText
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -1248,6 +1240,16 @@ IMPLEMENT_VARIANT_OBJECT(PrusaDataViewBitmapText)
|
||||||
// PrusaIconTextRenderer
|
// PrusaIconTextRenderer
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
PrusaBitmapTextRenderer::PrusaBitmapTextRenderer(wxDataViewCellMode mode /*= wxDATAVIEW_CELL_EDITABLE*/,
|
||||||
|
int align /*= wxDVR_DEFAULT_ALIGNMENT*/):
|
||||||
|
wxDataViewRenderer(wxT("PrusaDataViewBitmapText"), mode, align)
|
||||||
|
{
|
||||||
|
SetMode(mode);
|
||||||
|
SetAlignment(align);
|
||||||
|
}
|
||||||
|
#endif // ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool PrusaBitmapTextRenderer::SetValue(const wxVariant &value)
|
bool PrusaBitmapTextRenderer::SetValue(const wxVariant &value)
|
||||||
{
|
{
|
||||||
m_value << value;
|
m_value << value;
|
||||||
|
@ -1259,12 +1261,12 @@ bool PrusaBitmapTextRenderer::GetValue(wxVariant& WXUNUSED(value)) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING && wxUSE_ACCESSIBILITY
|
||||||
wxString PrusaBitmapTextRenderer::GetAccessibleDescription() const
|
wxString PrusaBitmapTextRenderer::GetAccessibleDescription() const
|
||||||
{
|
{
|
||||||
return m_value.GetText();
|
return m_value.GetText();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_ACCESSIBILITY
|
#endif // wxUSE_ACCESSIBILITY && ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool PrusaBitmapTextRenderer::Render(wxRect rect, wxDC *dc, int state)
|
bool PrusaBitmapTextRenderer::Render(wxRect rect, wxDC *dc, int state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -518,19 +518,26 @@ public:
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// PrusaBitmapTextRenderer
|
// PrusaBitmapTextRenderer
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
class PrusaBitmapTextRenderer : public wxDataViewRenderer//CustomRenderer
|
class PrusaBitmapTextRenderer : public wxDataViewRenderer
|
||||||
|
#else
|
||||||
|
class PrusaBitmapTextRenderer : public wxDataViewCustomRenderer
|
||||||
|
#endif //ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrusaBitmapTextRenderer(wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
PrusaBitmapTextRenderer(wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||||
int align = wxDVR_DEFAULT_ALIGNMENT);//:
|
int align = wxDVR_DEFAULT_ALIGNMENT
|
||||||
// wxDataViewRenderer/*CustomRenderer*/(wxT("PrusaDataViewBitmapText"), mode, align) {}
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
) : wxDataViewCustomRenderer(wxT("PrusaDataViewBitmapText"), mode, align) {}
|
||||||
|
#endif //ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
bool SetValue(const wxVariant &value);
|
bool SetValue(const wxVariant &value);
|
||||||
bool GetValue(wxVariant &value) const;
|
bool GetValue(wxVariant &value) const;
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING && wxUSE_ACCESSIBILITY
|
||||||
virtual wxString GetAccessibleDescription() const override;
|
virtual wxString GetAccessibleDescription() const override;
|
||||||
#endif // wxUSE_ACCESSIBILITY
|
#endif // wxUSE_ACCESSIBILITY && ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
|
||||||
|
|
||||||
virtual bool Render(wxRect cell, wxDC *dc, int state);
|
virtual bool Render(wxRect cell, wxDC *dc, int state);
|
||||||
virtual wxSize GetSize() const;
|
virtual wxSize GetSize() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue