MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TxtFunzione.cpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 //
00003 // Name:        TxtFunzione.cpp
00004 // Author:      Silvestro Jacopo
00005 // Created:     5/20/2005 16:11:38 PM
00006 //
00007 //------------------------------------------------------------------------------
00008 
00009 #include "../../include/TxtFunzione/TxtFunzione.h"
00010 IMPLEMENT_CLASS(TxtFunzione,wxTextCtrl)
00011 
00012 //------------------------------------------------------------------------------
00013 //
00014 //                            CARICO TABELLe EVENTI
00015 //
00016 //------------------------------------------------------------------------------
00017 
00018 
00019 BEGIN_EVENT_TABLE(TxtFunzione,wxTextCtrl)
00020      EVT_RIGHT_DOWN(TxtFunzione::OnRightDown)
00021          EVT_LEFT_DOWN(TxtFunzione::OnLeftDown)
00022      EVT_LEFT_UP(TxtFunzione::OnLeftUP)
00023      EVT_SIZE(TxtFunzione::OnSize)
00024      EVT_KEY_DOWN(TxtFunzione::OnChar)
00025      EVT_PAINT(TxtFunzione::OnPaint)
00026      EVT_MOTION(TxtFunzione::OnMotion)
00027 
00028 END_EVENT_TABLE()
00029 
00030 //------------------------------------------------------------------------------
00031 //
00032 //          IMPLEMENTAZIONE METODI DI TxtFunzione
00033 //
00034 //------------------------------------------------------------------------------
00035 void TxtFunzione::OnMotion(wxMouseEvent& event)
00036 {
00037   //   ((TBasePanel*)GetParent())->PannelloBaseOnMotion(event);
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046     event.Skip();
00047 }
00048 
00049 TxtFunzione::TxtFunzione (wxWindow* parent,
00050                           wxWindowID id,
00051                           const wxString& value,
00052                           const wxPoint& pos,
00053                           const wxSize& size,
00054                           long style,
00055                           const wxValidator& validator,
00056                           const wxString& name,char primocarattere)
00057 
00058                           :  wxTextCtrl(parent,id,value,pos,size,style,validator,name)
00059 {
00060 
00061  AppendText(wxChar(primocarattere));
00062  SetFocus();
00063  }
00064 //------------------------------------------------------------------------------
00065 //
00066 //          EVENTI A CUI TxtFunzione RISPONDE
00067 //
00068 //------------------------------------------------------------------------------
00069 
00070 
00071 void TxtFunzione::OnChar(wxKeyEvent& event){
00072 
00073 
00074  if (event.GetKeyCode()==WXK_RETURN)
00075  {GetParent()->SetFocus();
00076   event.ResumePropagation(1);
00077  }
00078  event.Skip();
00079 
00080     }
00081 //______________________________________________________________________________
00082 void TxtFunzione::OnRightDown(wxMouseEvent& event)
00083 {
00084    ((TBasePanel*)GetParent())->ImpostaSelezione();
00085     event.Skip();
00086 }
00087 //______________________________________________________________________________
00088 
00089  void TxtFunzione::OnLeftUP(wxMouseEvent& event)
00090  {  //Gestisco  il drag & drop nel caso che il tasto sinistro del mouse venga rilasciato nel grafico
00091 
00092 
00093 
00094    //((TBasePanel*)GetParent())->PannelloBaseOnLU(event);
00095 
00096      event.Skip();
00097 
00098 
00099 
00100 
00101  }
00102 
00103 //______________________________________________________________________________
00104 void TxtFunzione::OnLeftDown(wxMouseEvent& event)
00105 {
00106 
00107   ((TBasePanel*)GetParent())->ImpostaSelezione();
00108 
00109   event.Skip();
00110 }
00111 //______________________________________________________________________________
00112 
00113 //______________________________________________________________________________
00114 void TxtFunzione::OnPaint(wxPaintEvent& event){
00115          event.Skip();
00116     }
00117 //______________________________________________________________________________
00118 void TxtFunzione::OnSize(wxSizeEvent& event){
00119          event.Skip();
00120     }
00121 
00122 //______________________________________________________________________________
00123 
00124 
00125 
00126 //------------------------------------------------------------------------------
00127 //
00128 //                              FINE FILE
00129 //
00130 //------------------------------------------------------------------------------
00131 
00132 
00133 

 

SourceForge Logo