/[paragui]/paragui/src/widgets/pgspinnerbox.cpp
ViewVC logotype

Diff of /paragui/src/widgets/pgspinnerbox.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.1 by braindead, Fri Nov 21 12:27:56 2003 UTC revision 1.3.2.2 by braindead, Tue Dec 2 15:27:59 2003 UTC
# Line 27  Line 27 
27  */  */
28    
29  #include "pgspinnerbox.h"  #include "pgspinnerbox.h"
30    #include "pgmaskedit.h"
31    #include "pglineedit.h"
32    #include "pgbutton.h"
33    
34  /**  /**
35    *@author Atani - Mike Dunston    *@author Atani - Mike Dunston
# Line 48  PG_SpinnerBox::PG_SpinnerBox(PG_Widget * Line 51  PG_SpinnerBox::PG_SpinnerBox(PG_Widget *
51          down_rect.SetRect( box_rect.my_width, my_height - (my_height/2), (my_height/2), (my_height/2));          down_rect.SetRect( box_rect.my_width, my_height - (my_height/2), (my_height/2), (my_height/2));
52    
53          m_pEditBox = new PG_MaskEdit( this, box_rect, style );          m_pEditBox = new PG_MaskEdit( this, box_rect, style );
54          m_pEditBox->sigEditEnd.connect(slot(*this, &PG_SpinnerBox::handle_editend));          m_pEditBox->sigEditEnd.connect(slot(*this, &PG_SpinnerBox::handleEditEnd));
55    
56          m_pButtonUp = new PG_Button( this, PG_IDSPINNERBOX_UP, up_rect, "" );          m_pButtonUp = new PG_Button( this, PG_IDSPINNERBOX_UP, up_rect, "" );
57          m_pButtonUp->sigClick.connect(slot(*this, &PG_SpinnerBox::handleButtonClick));          m_pButtonUp->sigClick.connect(slot(*this, &PG_SpinnerBox::handleButtonClick));
# Line 118  void PG_SpinnerBox::AdjustSize() { Line 121  void PG_SpinnerBox::AdjustSize() {
121          Show();          Show();
122  }  }
123    
124  bool PG_SpinnerBox::handle_editend(PG_LineEdit* edit) {  bool PG_SpinnerBox::handleEditEnd(PG_LineEdit* edit) {
125          const char* text = m_pEditBox->GetText();          const char* text = m_pEditBox->GetText();
126          m_iValue = (text != NULL) ? atoi(text) : 0;          m_iValue = (text != NULL) ? atoi(text) : 0;
127    
# Line 134  bool PG_SpinnerBox::handle_editend(PG_Li Line 137  bool PG_SpinnerBox::handle_editend(PG_Li
137          SetTextValue();          SetTextValue();
138          return true;          return true;
139  }  }
140    
141    void PG_SpinnerBox::SetMask( const char *value ) {
142            strcpy( m_sMask, value );
143            m_pEditBox->SetMask( m_sMask );
144            AdjustSize();
145    }

Legend:
Removed from v.1.3.2.1  
changed lines
  Added in v.1.3.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26