OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::AmsTutorialPopup Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/AmsMappingPopup.hpp>

Inheritance diagram for Slic3r::GUI::AmsTutorialPopup:
Collaboration diagram for Slic3r::GUI::AmsTutorialPopup:

Public Member Functions

 AmsTutorialPopup (wxWindow *parent)
 ~AmsTutorialPopup ()
void paintEvent (wxPaintEvent &evt)
virtual void OnDismiss () wxOVERRIDE
virtual bool ProcessLeftDown (wxMouseEvent &event) wxOVERRIDE
bool Create (wxWindow *parent, int flags=wxBORDER_NONE)

Public Attributes

Label * text_title
wxStaticBitmap * img_top
wxStaticBitmap * arrows_top
wxStaticText * tip_top
wxStaticBitmap * arrows_bottom
wxStaticText * tip_bottom
wxStaticBitmap * img_middle
wxStaticText * tip_middle
wxStaticBitmap * img_botton

Protected Member Functions

virtual bool ShouldDismissOnTopWindowDeactivate ()

Detailed Description

Constructor & Destructor Documentation

◆ AmsTutorialPopup()

Slic3r::GUI::AmsTutorialPopup::AmsTutorialPopup ( wxWindow * parent)
1846:PopupWindow(parent, wxBORDER_NONE)
1847{
1848 Bind(wxEVT_PAINT, &AmsTutorialPopup::paintEvent, this);
1849 SetBackgroundColour(*wxWHITE);
1850
1851 wxBoxSizer* sizer_main;
1852 sizer_main = new wxBoxSizer(wxVERTICAL);
1853
1854 text_title = new Label(this, Label::Head_14, _L("Configure which AMS slot should be used for a filament used in the print job.")); // Orca: kept string (existing translation)
1855 text_title->SetSize(wxSize(FromDIP(350), -1));
1856 text_title->Wrap(FromDIP(350));
1857 sizer_main->Add(text_title, 0, wxALIGN_CENTER | wxTOP, 18);
1858
1859
1860 sizer_main->Add(0, 0, 0, wxTOP, 30);
1861
1862 wxBoxSizer* sizer_top;
1863 sizer_top = new wxBoxSizer(wxHORIZONTAL);
1864
1865 img_top = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("ams_item_examples", this, 30), wxDefaultPosition, wxSize(FromDIP(50), FromDIP(30)), 0);
1866 sizer_top->Add(img_top, 0, wxALIGN_CENTER, 0);
1867
1868
1869 sizer_top->Add(0, 0, 0, wxLEFT, 10);
1870
1871 wxBoxSizer* sizer_top_tips = new wxBoxSizer(wxVERTICAL);
1872 wxBoxSizer* sizer_tip_top = new wxBoxSizer(wxHORIZONTAL);
1873
1874 arrows_top = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("ams_arrow", this, 8), wxDefaultPosition, wxSize(FromDIP(24), FromDIP(8)), 0);
1875 sizer_tip_top->Add(arrows_top, 0, wxALIGN_CENTER, 0);
1876
1877 tip_top = new wxStaticText(this, wxID_ANY, _L("Filament used in this print job"), wxDefaultPosition, wxDefaultSize, 0);
1878 tip_top->SetForegroundColour(wxColour("#686868"));
1879
1880 sizer_tip_top->Add(tip_top, 0, wxALL, 0);
1881
1882
1883 sizer_top_tips->Add(sizer_tip_top, 0, wxEXPAND, 0);
1884
1885
1886 sizer_top_tips->Add(0, 0, 0, wxTOP, 6);
1887
1888 wxBoxSizer* sizer_tip_bottom = new wxBoxSizer(wxHORIZONTAL);
1889
1890 arrows_bottom = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("ams_arrow", this, 8), wxDefaultPosition, wxSize(FromDIP(24), FromDIP(8)), 0);
1891 tip_bottom = new wxStaticText(this, wxID_ANY, _L("AMS slot used for this filament"), wxDefaultPosition, wxDefaultSize, 0);
1892 tip_bottom->SetForegroundColour(wxColour("#686868"));
1893
1894
1895 sizer_tip_bottom->Add(arrows_bottom, 0, wxALIGN_CENTER, 0);
1896 sizer_tip_bottom->Add(tip_bottom, 0, wxALL, 0);
1897
1898
1899 sizer_top_tips->Add(sizer_tip_bottom, 0, wxEXPAND, 0);
1900
1901
1902 sizer_top->Add(sizer_top_tips, 0, wxALIGN_CENTER, 0);
1903
1904
1905
1906
1907 wxBoxSizer* sizer_middle = new wxBoxSizer(wxHORIZONTAL);
1908
1909 img_middle= new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("ams_item_examples", this, 30), wxDefaultPosition, wxSize(FromDIP(50), FromDIP(30)), 0);
1910 sizer_middle->Add(img_middle, 0, wxALIGN_CENTER, 0);
1911
1912 tip_middle = new wxStaticText(this, wxID_ANY, _L("Click to select AMS slot manually"), wxDefaultPosition, wxDefaultSize, 0);
1913 tip_middle->SetForegroundColour(wxColour("#686868"));
1914 sizer_middle->Add(0, 0, 0,wxLEFT, 15);
1915 sizer_middle->Add(tip_middle, 0, wxALIGN_CENTER, 0);
1916
1917
1918 sizer_main->Add(sizer_top, 0, wxLEFT, 40);
1919 sizer_main->Add(0, 0, 0, wxTOP, 10);
1920 sizer_main->Add(sizer_middle, 0, wxLEFT, 40);
1921 sizer_main->Add(0, 0, 0, wxTOP, 10);
1922
1923
1924 img_botton = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("ams_mapping_examples", this, 87), wxDefaultPosition, wxDefaultSize, 0);
1925 sizer_main->Add(img_botton, 0, wxLEFT | wxRIGHT, 40);
1926 sizer_main->Add(0, 0, 0, wxTOP, 12);
1927
1928 SetSizer(sizer_main);
1929 Layout();
1930 Fit();
1931}
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
static wxFont Head_14
Definition Label.hpp:45
PopupWindow()
Definition PopupWindow.hpp:10
wxStaticBitmap * img_middle
Definition AmsMappingPopup.hpp:484
Label * text_title
Definition AmsMappingPopup.hpp:478
wxStaticText * tip_middle
Definition AmsMappingPopup.hpp:485
void paintEvent(wxPaintEvent &evt)
Definition AmsMappingPopup.cpp:1933
wxStaticBitmap * img_top
Definition AmsMappingPopup.hpp:479
wxStaticBitmap * arrows_bottom
Definition AmsMappingPopup.hpp:482
wxStaticText * tip_bottom
Definition AmsMappingPopup.hpp:483
wxStaticText * tip_top
Definition AmsMappingPopup.hpp:481
wxStaticBitmap * img_botton
Definition AmsMappingPopup.hpp:486
wxStaticBitmap * arrows_top
Definition AmsMappingPopup.hpp:480
wxBitmap create_scaled_bitmap(const std::string &bmp_name_in, wxWindow *win, const int px_cnt, const bool grayscale, const std::string &new_color, const bool menu_bitmap, const bool resize, const bool bitmap2, const std::vector< std::string > &array_new_color)
Definition wxExtensions.cpp:448

References PopupWindow::PopupWindow(), _L, arrows_bottom, arrows_top, create_scaled_bitmap(), Label::Head_14, img_botton, img_middle, img_top, paintEvent(), text_title, tip_bottom, tip_middle, tip_top, and wxStaticText.

Here is the call graph for this function:

◆ ~AmsTutorialPopup()

Slic3r::GUI::AmsTutorialPopup::~AmsTutorialPopup ( )
inline
489{};

Member Function Documentation

◆ Create()

bool PopupWindow::Create ( wxWindow * parent,
int flags = wxBORDER_NONE )
inherited
22{
23 if (!wxPopupTransientWindow::Create(parent, style))
24 return false;
25#ifdef __WXGTK__
26 GetTopParent(parent)->Bind(wxEVT_ACTIVATE, &PopupWindow::topWindowActiavate, this);
27#endif
28#ifdef __WXOSX__
29 if (style & wxPU_CONTAINS_CONTROLS)
30 for (auto evt : {wxEVT_LEFT_DOWN, wxEVT_LEFT_UP, wxEVT_LEFT_DCLICK, wxEVT_MOTION, wxEVT_MOUSEWHEEL})
31 Bind(evt, &PopupWindow::OnMouseEvent2, this);
32#endif
33 return true;
34}
static wxWindow * GetTopParent(wxWindow *pWindow)
Definition PopupWindow.cpp:10
#define style
Definition WipeTowerDialog.cpp:101

References GetTopParent(), and style.

Referenced by PopupWindow(), and DropDown::Create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnDismiss()

void Slic3r::GUI::AmsTutorialPopup::OnDismiss ( )
virtual
1941{}

◆ paintEvent()

void Slic3r::GUI::AmsTutorialPopup::paintEvent ( wxPaintEvent & evt)
1934{
1935 wxPaintDC dc(this);
1936 dc.SetPen(wxColour(0xAC, 0xAC, 0xAC));
1937 dc.SetBrush(*wxTRANSPARENT_BRUSH);
1938 dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
1939}

Referenced by AmsTutorialPopup().

Here is the caller graph for this function:

◆ ProcessLeftDown()

bool Slic3r::GUI::AmsTutorialPopup::ProcessLeftDown ( wxMouseEvent & event)
virtual
1943 {
1944 return PopupWindow::ProcessLeftDown(event);
1945}

References Slic3r::GUI::wxMouseEvent.

◆ ShouldDismissOnTopWindowDeactivate()

virtual bool PopupWindow::ShouldDismissOnTopWindowDeactivate ( )
inlineprotectedvirtualinherited

Reimplemented in DropDown.

28{ return true; }

Member Data Documentation

◆ arrows_bottom

wxStaticBitmap* Slic3r::GUI::AmsTutorialPopup::arrows_bottom

Referenced by AmsTutorialPopup().

◆ arrows_top

wxStaticBitmap* Slic3r::GUI::AmsTutorialPopup::arrows_top

Referenced by AmsTutorialPopup().

◆ img_botton

wxStaticBitmap* Slic3r::GUI::AmsTutorialPopup::img_botton

Referenced by AmsTutorialPopup().

◆ img_middle

wxStaticBitmap* Slic3r::GUI::AmsTutorialPopup::img_middle

Referenced by AmsTutorialPopup().

◆ img_top

wxStaticBitmap* Slic3r::GUI::AmsTutorialPopup::img_top

Referenced by AmsTutorialPopup().

◆ text_title

Label* Slic3r::GUI::AmsTutorialPopup::text_title

Referenced by AmsTutorialPopup().

◆ tip_bottom

wxStaticText* Slic3r::GUI::AmsTutorialPopup::tip_bottom

Referenced by AmsTutorialPopup().

◆ tip_middle

wxStaticText* Slic3r::GUI::AmsTutorialPopup::tip_middle

Referenced by AmsTutorialPopup().

◆ tip_top

wxStaticText* Slic3r::GUI::AmsTutorialPopup::tip_top

Referenced by AmsTutorialPopup().


The documentation for this class was generated from the following files: