#include <wxMaskEdit.h>
Graphe d'héritage de NumberGroup:
Types publics | |
enum | NGBehaviour { NZEROS, NBLANKS } |
Fonctions membres publiques | |
NumberGroup (size_t ord, NGBehaviour beh) | |
virtual | ~NumberGroup () |
virtual wxString | getValue () const |
virtual bool | isStatic () const |
virtual int | OnKeyDown (wxKeyEvent &evt, size_t pos) |
virtual void | normalize () |
virtual wxString | getTransform () const |
Attributs publics | |
enum NumberGroup::NGBehaviour | m_beh |
Fonctions membres privées | |
void | goNormBlank () |
void | goNormZero () |
Définition à la ligne 67 du fichier wxMaskEdit.h.
|
Définition à la ligne 70 du fichier wxMaskEdit.h.
|
|
Définition à la ligne 114 du fichier wxmaskedit.cpp.
|
|
Définition à la ligne 119 du fichier wxmaskedit.cpp.
|
|
Réimplémentée à partir de TextPart. Définition à la ligne 241 du fichier wxmaskedit.cpp. Références TextPart::getSize(), TextPart::getValue(), m_beh, NBLANKS, et NZEROS. 00242 { 00243 00244 // No complete or long control so double 00245 // The principle of the controle of seizure is not to take the hand 00246 // on results but to assure the waited conformitée 00247 00248 00249 wxString val( TextPart::getValue() ); 00250 size_t ncar = this->getSize(); 00251 val.Replace("_", " "); 00252 // partit commune 00253 size_t ldiff = ncar - val.Len(); 00254 if (m_beh == NZEROS) val.Pad(ldiff, '0', false); 00255 //take what we have and pad with zeros 00256 00257 if (m_beh == NBLANKS) val.Pad(ldiff, ' ', false); 00258 //take what we have and pad with blank 00259 00260 00261 return val; 00262 }
|
|
Réimplémentée à partir de TextPart. Définition à la ligne 123 du fichier wxmaskedit.cpp. Références TextPart::getValue(), et wxMaskEdit::IsControl(). 00124 { 00125 wxString ret; 00126 size_t valLen = TextPart::getValue().Len(); 00127 00128 for (size_t i = 0; i < valLen; i++) { 00129 if ( wxMaskEdit::IsControl(TextPart::getValue()[i]) ) { 00130 ret += "_"; 00131 } 00132 else { 00133 ret += TextPart::getValue()[i]; 00134 } 00135 } 00136 00137 return ret; 00138 }
|
|
Définition à la ligne 186 du fichier wxmaskedit.cpp. Références TextPart::getOrder(), TextPart::getSize(), TextPart::getStyle(), TextPart::getValue(), ME_NDEC, et ME_NDECS. Référencé par normalize(). 00187 { 00188 wxString val( TextPart::getValue() ); 00189 //replace N's with nothing 00190 val.Replace("#", "_"); 00191 // val.Replace("_", " "); 00192 00193 for (size_t i = this->getSize(), n =this->getSize()-1 ; i >0 ; i-- , n--) if(val[n] == '_') val.Remove(n,1); 00194 //take what we have and pad with zeros 00195 size_t ldiff = this->getSize() - val.Len(); 00196 00197 if ( this->getStyle() == ME_NDEC || this->getStyle() == ME_NDECS) { 00198 if (TextPart::getOrder() < 2 ) 00199 if ( ldiff > 0 ) val.Pad(ldiff, '_', false); 00200 if (TextPart::getOrder() == 2 ) 00201 if ( ldiff > 0 ) val.Pad(ldiff, '0', true); 00202 } 00203 00204 if ( this->getStyle() == ME_NUM || this->getStyle() == ME_SIGNED) { 00205 if ( ldiff > 0 ) val.Pad(ldiff, '_', false); 00206 } 00207 00208 if ( this->getStyle() == ME_DATE) { 00209 if ( ldiff > 0 ) val.Pad(ldiff, '0', false); 00210 } 00211 00212 this->setValue(val); 00213 }
|
|
Définition à la ligne 215 du fichier wxmaskedit.cpp. Références TextPart::getOrder(), TextPart::getSize(), TextPart::getStyle(), TextPart::getValue(), ME_NDEC, et ME_NDECS. Référencé par normalize(). 00216 { 00217 wxString val( TextPart::getValue() ); 00218 //replace N's with nothing 00219 val.Replace("#", "_"); 00220 // val.Replace("_", " "); 00221 00222 for (size_t i = this->getSize(), n =this->getSize()-1 ; i >0 ; i-- , n--) if(val[n] == '_') val.Remove(n,1); 00223 00224 //take what we have and pad with zeros 00225 00226 size_t ldiff = this->getSize() - val.Len(); 00227 if ( this->getStyle() == ME_NDEC || this->getStyle() == ME_NDECS) { 00228 if (TextPart::getOrder() < 2 ) 00229 if ( ldiff > 0 ) val.Pad(ldiff, '0', false); 00230 if (TextPart::getOrder() == 2 ) 00231 if ( ldiff > 0 ) val.Pad(ldiff, '0', true); 00232 } 00233 if ( this->getStyle() == ME_NUM || this->getStyle() == ME_SIGNED 00234 || this->getStyle() == ME_DATE) { 00235 if ( ldiff > 0 ) val.Pad(ldiff, '0', false); 00236 } 00237 00238 this->setValue(val); 00239 }
|
|
Réimplémentée à partir de TextPart. Définition à la ligne 140 du fichier wxmaskedit.cpp.
|
|
Réimplémentée à partir de TextPart. Définition à la ligne 174 du fichier wxmaskedit.cpp. Références goNormBlank(), goNormZero(), m_beh, NBLANKS, et NZEROS. 00175 { 00176 00177 if (m_beh == NBLANKS) { 00178 this->goNormBlank(); 00179 } 00180 else if (m_beh == NZEROS) { 00181 this->goNormZero(); 00182 } 00183 00184 }
|
|
Réimplémentée à partir de TextPart. Définition à la ligne 147 du fichier wxmaskedit.cpp. Références TextPart::getStyle(), TextPart::getValue(), ME_DATE, ME_NDEC, ME_NDECS, ME_NUM, ME_SIGNED, et TextPart::setValue(). 00148 { 00149 int style = this->getStyle(); 00150 wxString val( TextPart::getValue() ); 00151 if(style != ME_NUM && style != ME_SIGNED && 00152 style != ME_NDEC && style != ME_NDECS && style != ME_DATE ) return 0 ; 00153 00154 if (evt.GetKeyCode() == WXK_BACK) { 00155 val[pos] = '#'; 00156 this->setValue(val); 00157 return 0; 00158 } 00159 else if (evt.GetKeyCode() == WXK_DELETE) { 00160 00161 val[pos] = '#'; 00162 this->setValue(val); 00163 return 0; 00164 } 00165 00166 val[pos] = evt.GetKeyCode(); 00167 this->setValue(val); 00168 return 1; 00169 00170 }
|
|
Référencé par getTransform(), et normalize(). |