Skip to content

Commit

Permalink
add the EpaisseurTrait feature, but not tryable
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneRoot committed Nov 3, 2012
1 parent 5d8c7b3 commit 5b13f68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ls6/ihm/mini_projet/dialogs.cpp
Expand Up @@ -6,6 +6,7 @@ BEGIN_EVENT_TABLE(ColorDialog, wxDialog)
EVT_RADIOBOX(COULEUR_RD_BOX, ColorDialog::OnChangerCouleur)
END_EVENT_TABLE ()
BEGIN_EVENT_TABLE(EpaisseurDialog, wxDialog)
EVT_SCROLL(EpaisseurDialog::OnScroll)
END_EVENT_TABLE ()
BEGIN_EVENT_TABLE(TriangleDialog, wxDialog)
EVT_BUTTON(TEXTE_PROPRIETES, TriangleDialog::OnProprietes)
Expand Down Expand Up @@ -43,6 +44,7 @@ VersionDialog::~VersionDialog()

EpaisseurDialog::EpaisseurDialog( wxWindow *parent, wxWindowID id, const wxString &title) : wxDialog( parent, id, title)
{
main_frame = (CMainFrame *) parent;
conteneur = new wxBoxSizer( wxVERTICAL );
texte = new wxStaticText( this, V_ID_TEXTE, wxT("Choisir la nouvelle épaisseur de trait"));

Expand All @@ -61,6 +63,12 @@ EpaisseurDialog::EpaisseurDialog( wxWindow *parent, wxWindowID id, const wxStrin

}


void EpaisseurDialog::OnScroll(wxScrollEvent& e)
{
//std::cout << "coucou " << slider->GetValue() << std::endl;
main_frame->setEpaisseurTraitCourante(slider->GetValue());
}
EpaisseurDialog::~EpaisseurDialog()
{
/*
Expand Down
3 changes: 3 additions & 0 deletions ls6/ihm/mini_projet/dialogs.h
Expand Up @@ -12,6 +12,7 @@
#include <wx/combobox.h>
#include <wx/colour.h>
#include <wx/sizer.h>
#include <wx/slider.h>

#include "mainframe.h"

Expand All @@ -34,6 +35,8 @@ class EpaisseurDialog: public wxDialog {
EpaisseurDialog(wxWindow *parent, wxWindowID id, const wxString &title);
virtual ~EpaisseurDialog();
private :
void OnScroll(wxScrollEvent& e);
CMainFrame *main_frame;
wxBoxSizer *conteneur;
wxStaticText *texte;
wxSlider *slider;
Expand Down

0 comments on commit 5b13f68

Please sign in to comment.