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

Method updateWinFlags

src/eepp/ui/uiwindow.cpp:157–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void UIWindow::updateWinFlags() {
158 bool needsUpdate = false;
159
160 writeNodeFlag( NODE_FLAG_FRAME_BUFFER,
161 ( mStyleConfig.WinFlags & UI_WIN_FRAME_BUFFER ) ? 1 : 0 );
162
163 if ( ( mStyleConfig.WinFlags & UI_WIN_FRAME_BUFFER ) ) {
164 if ( NULL == mFrameBuffer )
165 createFrameBuffer();
166 } else {
167 eeSAFE_DELETE( mFrameBuffer );
168 }
169
170 if ( NULL != mContainer && ( mStyleConfig.WinFlags & UI_WIN_DRAGGABLE_CONTAINER ) ) {
171 mContainer->setDragEnabled( true );
172 } else {
173 setDragEnabled( false );
174 }
175
176 if ( !( mStyleConfig.WinFlags & UI_WIN_NO_DECORATION ) ) {
177 if ( NULL == mWindowDecoration ) {
178 mWindowDecoration = UIWidget::NewWithTag( "window::decoration" );
179 mWindowDecoration->writeNodeFlag( NODE_FLAG_OWNED_BY_NODE, 1 );
180 }
181
182 auto cb = [this]( const Event* ) { onSizeChange(); };
183
184 mWindowDecoration->setParent( this );
185 mWindowDecoration->setVisible( true );
186 mWindowDecoration->setEnabled( false );
187
188 if ( NULL == mBorderLeft ) {
189 mBorderLeft = UIWidget::NewWithTag( "window::border::left" );
190 mBorderLeft->writeNodeFlag( NODE_FLAG_OWNED_BY_NODE, 1 );
191 }
192
193 mBorderLeft->setParent( this );
194 mBorderLeft->setEnabled( true );
195 mBorderLeft->setVisible( true );
196
197 if ( NULL == mBorderRight ) {
198 mBorderRight = UIWidget::NewWithTag( "window::border::right" );
199 mBorderRight->writeNodeFlag( NODE_FLAG_OWNED_BY_NODE, 1 );
200 }
201
202 mBorderRight->setParent( this );
203 mBorderRight->setEnabled( true );
204 mBorderRight->setVisible( true );
205
206 if ( NULL == mBorderBottom ) {
207 mBorderBottom = UIWidget::NewWithTag( "window::border::bottom" );
208 mBorderBottom->writeNodeFlag( NODE_FLAG_OWNED_BY_NODE, 1 );
209 }
210
211 mBorderBottom->setParent( this );
212 mBorderBottom->setEnabled( true );
213 mBorderBottom->setVisible( true );
214

Callers

nothing calls this directly

Calls 9

setDragEnabledMethod · 0.80
writeNodeFlagMethod · 0.80
setParentMethod · 0.80
toFrontMethod · 0.80
closeMethod · 0.65
setVisibleMethod · 0.45
setEnabledMethod · 0.45
onMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected