make install + generator references installed headers

Mirror of the C fix: the Rust generator emits the same XFrame C++
code, so it now defaults WIDGETS_DIR / LIGHTGUI_WIDGETS_DIR to
/usr/local/include/lightgui instead of the hardcoded
/opt/lightgui/widgets. Added a make install target (installs the
1100 header-only widget headers from the C repo,
$(LIGHTGUI_SRC)/widgets, to PREFIX/include/lightgui).
Fixtures regenerated from the fixed C++ gen_matrix output
(all 16 cases: Makefile/CMakeLists.txt/README.md now reference the
installed location; main.cpp unchanged). Fixture test passes.
This commit is contained in:
cnmcdee committed 2026-11-30 03:29:58 +00:00
1 parent bf6a90d1e5
commit 1ae85cd6c3
53 files changed
+106 -90

No files matched your search

+17 -1
View File
@@ -13,7 +13,23 @@
LIGHTGUI_SRC ?= /opt/lightgui
PY ?= python3
.PHONY: regen check check-registry check-palette check-props check-events check-indicators
.PHONY: regen check check-registry check-palette check-props check-events check-indicators install
# Install the XFrame widget headers (header-only) so generated apps
# build on any machine where LightGUI is installed. The headers live
# in the C repo ($(LIGHTGUI_SRC)/widgets); this just copies them to
# $(PREFIX)/include/lightgui. The Rust generator emits the same
# default include path as the C generator.
PREFIX ?= /usr/local
INCLUDEDIR ?= $(PREFIX)/include/lightgui
install:
@echo "Installing LightGUI widget headers to $(INCLUDEDIR)"
@mkdir -p $(INCLUDEDIR)
@cd $(LIGHTGUI_SRC)/widgets && find common core components -name '*.h' | while read f; do \
install -D -m 644 "$$f" "$(INCLUDEDIR)/$$f"; \
done
@echo "Installed $$(find $(LIGHTGUI_SRC)/widgets/common $(LIGHTGUI_SRC)/widgets/core $(LIGHTGUI_SRC)/widgets/components -name '*.h' | wc -l) headers to $(INCLUDEDIR)"
regen:
LIGHTGUI_SRC=$(LIGHTGUI_SRC) $(PY) tools/extract_all.py
+5 -5
View File
@@ -1743,14 +1743,14 @@ fn emit_cmake_lists(cls: &str) -> String {
let mut o = String::new();
o.push_str("# Generated by LightGUI (C++/XFrame).\n");
o.push_str("# Build: cmake -S . -B build && cmake --build build\n");
o.push_str("# The XFrame widget sources live in the LightGUI repo; point at\n");
o.push_str("# The XFrame widget headers live in the installed location; point at\n");
o.push_str("# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the\n");
o.push_str("# default below.\n");
o.push_str("cmake_minimum_required(VERSION 3.20)\n");
o.push_str(&format!("project({cls} CXX)\n"));
o.push_str("set(CMAKE_CXX_STANDARD 17)\n");
o.push_str("set(CMAKE_CXX_STANDARD_REQUIRED ON)\n");
o.push_str("set(LIGHTGUI_WIDGETS_DIR \"/opt/lightgui/widgets\" CACHE PATH \"LightGUI XFrame widget sources (widgets/common/registry.h)\")\n");
o.push_str("set(LIGHTGUI_WIDGETS_DIR \"/usr/local/include/lightgui\" CACHE PATH \"LightGUI XFrame widget sources (widgets/common/registry.h)\")\n");
o.push_str("if(NOT EXISTS \"${LIGHTGUI_WIDGETS_DIR}/common/registry.h\")\n");
o.push_str(" message(FATAL_ERROR \"XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets\")\n");
o.push_str("endif()\n");
@@ -1764,10 +1764,10 @@ fn emit_cmake_lists(cls: &str) -> String {
fn emit_makefile() -> String {
let mut o = String::new();
o.push_str("# Generated by LightGUI (C++/XFrame).\n");
o.push_str("# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]\n");
o.push_str("# Build: make [WIDGETS_DIR=<installed-headers>]\n");
o.push_str("CXX ?= g++\n");
o.push_str("CXXFLAGS ?= -O2 -Wall -std=c++17\n");
o.push_str("WIDGETS_DIR ?= /opt/lightgui/widgets\n");
o.push_str("WIDGETS_DIR ?= /usr/local/include/lightgui\n");
o.push_str("X11FLAGS := $(shell pkg-config --cflags x11)\n");
o.push_str("X11LIBS := $(shell pkg-config --libs x11)\n\n");
o.push_str("app: main.cpp\n");
@@ -1788,7 +1788,7 @@ fn emit_readme(project: &Project, widgets: &[Widget]) -> String {
o.push_str("```\n\n");
o.push_str("Both need the XFrame widget sources from the LightGUI repo\n");
o.push_str("(`widgets/common/registry.h`). Default location is\n");
o.push_str("`/opt/lightgui/widgets`; override with\n");
o.push_str("`/usr/local/include/lightgui`; override with\n");
o.push_str("`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or\n");
o.push_str("`make WIDGETS_DIR=<path>`.\n\n");
o.push_str("## Run\n\n");
+2 -2
View File
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
+1 -1
View File
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
+1 -1
View File
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
+1 -1
View File
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
+2 -2
View File
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
+1 -1
View File
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -11,7 +11,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(mycoolapp CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(W9lives CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
+2 -2
View File
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
+1 -1
View File
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
+1 -1
View File
@@ -37,7 +37,7 @@ int main() {
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
// data-file: "/tmp/lightgui-xframe-fixtures/14_stockchart/SPY_fake.csv"
// data-file: "/tmp/genprobe3/14_stockchart/SPY_fake.csv"
// scale-mode: 0 (0 = price, 1 = percent)
lg::Holder<GtkLabel> Label_001(display, screen, window, gc, &styles, 10, 340, 100, 24);
Label_001.w.set_text("Label_001");
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -37,7 +37,7 @@ int main() {
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
// data-file: "/tmp/lightgui-xframe-fixtures/15_stockchart_indicators/SPY_fake_long.csv"
// data-file: "/tmp/genprobe3/15_stockchart_indicators/SPY_fake_long.csv"
// indicators: "SMA(20), EMA(50), Bollinger Bands, RSI, MACD, Engulfing"
// scale-mode: 0 (0 = price, 1 = percent)
std::vector<lg::IWidget*> widgets = { &StockChart_001 };
@@ -1,13 +1,13 @@
# Generated by LightGUI (C++/XFrame).
# Build: cmake -S . -B build && cmake --build build
# The XFrame widget sources live in the LightGUI repo; point at
# The XFrame widget headers live in the installed location; point at
# them with -DLIGHTGUI_WIDGETS_DIR=<path> if they are not at the
# default below.
cmake_minimum_required(VERSION 3.20)
project(MyWindow CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(LIGHTGUI_WIDGETS_DIR "/opt/lightgui/widgets" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
set(LIGHTGUI_WIDGETS_DIR "/usr/local/include/lightgui" CACHE PATH "LightGUI XFrame widget sources (widgets/common/registry.h)")
if(NOT EXISTS "${LIGHTGUI_WIDGETS_DIR}/common/registry.h")
message(FATAL_ERROR "XFrame widget sources not found at ${LIGHTGUI_WIDGETS_DIR} - pass -DLIGHTGUI_WIDGETS_DIR=<lightgui-repo>/widgets")
endif()
@@ -1,8 +1,8 @@
# Generated by LightGUI (C++/XFrame).
# Build: make [WIDGETS_DIR=<lightgui-repo>/widgets]
# Build: make [WIDGETS_DIR=<installed-headers>]
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -std=c++17
WIDGETS_DIR ?= /opt/lightgui/widgets
WIDGETS_DIR ?= /usr/local/include/lightgui
X11FLAGS := $(shell pkg-config --cflags x11)
X11LIBS := $(shell pkg-config --libs x11)
@@ -10,7 +10,7 @@ cmake -S . -B build && cmake --build build # or: make
Both need the XFrame widget sources from the LightGUI repo
(`widgets/common/registry.h`). Default location is
`/opt/lightgui/widgets`; override with
`/usr/local/include/lightgui`; override with
`-DLIGHTGUI_WIDGETS_DIR=<path>` (CMake) or
`make WIDGETS_DIR=<path>`.
@@ -37,10 +37,10 @@ int main() {
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
// data-file: "/tmp/lightgui-xframe-fixtures/16_stockchart_pro/SPY_fake_long.csv"
// data-file: "/tmp/genprobe3/16_stockchart_pro/SPY_fake_long.csv"
// indicators: "SMA(20), RSI"
// drawings: "trend 790 676 1150 690 red; hline 688 blue; fib 800 674 1000 692 purple; text 830 691 orange Resistance zone; rect 860 678 960 684 teal; arrow 920 690 1090 680 magenta; measure 840 677 1010 689 black"
// compare-files: "/tmp/lightgui-xframe-fixtures/16_stockchart_pro/QQQ_fake_long.csv"
// compare-files: "/tmp/genprobe3/16_stockchart_pro/QQQ_fake_long.csv"
// scale-mode: 1 (0 = price, 1 = percent)
std::vector<lg::IWidget*> widgets = { &StockChart_001 };
auto redraw_all = [&]() {