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

Method registerTopSpace

src/eepp/ui/uicodeeditor.cpp:3439–3449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3437}
3438
3439bool UICodeEditor::registerTopSpace( UICodeEditorPlugin* plugin, const Float& pixels, int order ) {
3440 if ( topSpaceExists( plugin ) )
3441 return false;
3442 mPluginTopSpaces.push_back( { plugin, pixels, order } );
3443 mPluginsTopSpace += pixels;
3444 std::sort( mPluginTopSpaces.begin(), mPluginTopSpaces.end(),
3445 []( const PluginRequestedSpace& left, const PluginRequestedSpace& right ) {
3446 return left.order < right.order;
3447 } );
3448 return true;
3449}
3450
3451bool UICodeEditor::unregisterTopSpace( UICodeEditorPlugin* plugin ) {
3452 for ( size_t i = 0; i < mPluginTopSpaces.size(); ++i ) {

Callers 2

onRegisterMethod · 0.80
onRegisterMethod · 0.80

Calls 4

sortFunction · 0.85
push_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected