MCPcopy Create free account
hub / github.com/SpartanJ/eepp / UITextInput

Method UITextInput

src/eepp/ui/uitextinput.cpp:34–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34UITextInput::UITextInput( const std::string& tag ) :
35 UITextView( tag ),
36 mCursorPos( 0 ),
37 mAllowEditing( true ),
38 mShowingWait( true ),
39 mOnlyNumbers( false ),
40 mAllowFloat( false ),
41 mMouseDown( false ),
42 mKeyBindings( getInput() ) {
43 mHintCache = Text::New();
44
45 UITheme* theme = getUISceneNode()->getUIThemeManager()->getDefaultTheme();
46
47 if ( NULL != theme && NULL != theme->getDefaultFont() ) {
48 setHintFont( theme->getDefaultFont() );
49 }
50
51 if ( NULL == mHintCache->getFont() ) {
52 if ( NULL != getUISceneNode()->getUIThemeManager()->getDefaultFont() ) {
53 setHintFont( getUISceneNode()->getUIThemeManager()->getDefaultFont() );
54 } else {
55 Log::error( "UITextInput::UITextInput : Created a without a defined font." );
56 }
57 }
58
59 if ( NULL != theme ) {
60 setHintFontSize( theme->getDefaultFontSize() );
61 } else {
62 setHintFontSize( getUISceneNode()->getUIThemeManager()->getDefaultFontSize() );
63 }
64
65 subscribeScheduledUpdate();
66
67 setFlags( UI_AUTO_PADDING | UI_AUTO_SIZE | UI_TEXT_SELECTION_ENABLED );
68 setClipType( ClipType::ContentBox );
69
70 mDoc.registerClient( this );
71 registerCommands();
72 registerKeybindings();
73
74 applyDefaultTheme();
75}
76
77UITextInput::UITextInput() : UITextInput( "textinput" ) {}
78

Callers

nothing calls this directly

Calls 7

errorFunction · 0.85
getDefaultThemeMethod · 0.80
getUIThemeManagerMethod · 0.80
NewFunction · 0.50
getDefaultFontMethod · 0.45
getFontMethod · 0.45
registerClientMethod · 0.45

Tested by

no test coverage detected