Skip to content

C++ updates and code cleanup #42

@greg7mdp

Description

@greg7mdp
  • implement proper queue for notifying the main thread
  • proper classes for luigi widgets
  • update LoadFile to UICode::load() and use it in luigi_example.cpp
  • luigi: make UIElement a proper base class of widgets.
  • luigi: make the MessageProc member functions
  • luigi: remove unneeded UIElement:: and other namespace prefixes
  • luigi: remove free functions, create UI class
  • luigi: implement UIPainter proper class with member functions
  • luigi: replace free UI*Create functions with static class members Create.
  • luigi: move X11 and Win32 free functions into classes
  • don't use raw pointers unless they are non-owning
  • cleanup msgReceivedData / msgReceivedLog / msgReceivedControl
  • create breakpoints & BreakpointMgr classes?
  • create Debugger class instead of calling stuff like evaluate("gdbf_valueof") or EvaluateExpression(e), which should include the current EvaluateExpression, EvaluateCommand, DebuggerSend, DebuggerStartThread, ...
  • Debugger class could also hold the info about the program being debugged, instead of some of it being in SourceWindow like _auto_print_expression, ... (update #ifdef'ed out code too)
  • replace remaining char arrays in gf.cpp
  • have DisplaySetPosition take a std::string_view and int, and use re to extract the path and line # so we don't copy the string (look for _location)
  • use UIPoint instead of x and y
  • use clang-tidy gf.cpp --checks=-*,bugprone*,modernize* --fix -- --std=c++23

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions