MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / DisplayContextMenu

Method DisplayContextMenu

LibLemon/src/gui/window.cpp:285–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 }
284
285 void Window::DisplayContextMenu(const std::vector<ContextMenuEntry>& entries, vector2i_t pos){
286 if(pos.x == -1 && pos.y == -1){
287 pos = lastMousePos;
288 }
289
290 std::ostringstream serializedEntries;
291 for(const ContextMenuEntry& ent : entries){
292 serializedEntries << ent.id << "," << ent.name << ";";
293 }
294
295 std::string str = serializedEntries.str();
296
297 WMClient::DisplayContextMenu(pos.x, pos.y, str);
298 }
299
300 void Window::CreateMenuBar(){
301 menuBar = new WindowMenuBar();

Callers 3

OnMouseDownMethod · 0.80
OnRightMouseDownMethod · 0.80
OpenMethod · 0.80

Calls 1

MessageClass · 0.50

Tested by

no test coverage detected