Step 132: library symbol browser

This commit is contained in:
Bill
2026-02-09 17:05:09 -07:00
parent ae95aeb303
commit dcc963f625
7 changed files with 194 additions and 2 deletions

View File

@@ -45,6 +45,7 @@
#include "BuildSystem.h"
#include "DependencyPanel.h"
#include "LibraryIndexer.h"
#include "LibraryBrowserPanel.h"
#include "IncrementalOptimizer.h"
#include "ast/Serialization.h"
#include "ast/Generator.h"
@@ -167,6 +168,8 @@ struct EditorState {
std::string lastBuildCommand;
bool showDependencyPanel = true;
DependencyPanelState dependencyPanel;
bool showLibraryBrowserPanel = true;
LibraryBrowserState libraryBrowser;
struct LibraryIndexRequest {
std::string name;
std::string version;
@@ -355,6 +358,15 @@ struct EditorState {
onTextChanged();
}
void insertTextAtCursor(const std::string& text) {
if (!active() || text.empty()) return;
bool changed = false;
active()->widget.insertText(active()->editBuf, text, changed);
if (changed) {
onTextChanged();
}
}
std::string makeUntitledName() const {
if (!buffers.hasBuffer("(untitled)")) return "(untitled)";
int i = 1;