Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f00f9096b |
No files matched your search
+85
-1
@@ -182,6 +182,8 @@ struct Item {
|
||||
|
||||
static Project g_project;
|
||||
static GtkWidget* g_window = nullptr;
|
||||
static GtkWidget* g_palette_window = nullptr; // top-level palette window
|
||||
static GtkWidget* g_palette_menu_item = nullptr; // View -> Widget Palette
|
||||
static GtkWidget* g_canvas = nullptr; // GtkFixed
|
||||
static GtkWidget* g_viewport = nullptr; // canvas parent (window background)
|
||||
static GtkWidget* g_statusbar = nullptr;
|
||||
@@ -2407,6 +2409,39 @@ static void on_palette_clicked(GtkButton*, gpointer data) {
|
||||
add_widget((const char*)data);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------- palette window
|
||||
// The widget palette lives in its own top-level window ("FDesigner —
|
||||
// Widgets"), opened together with the designer. It is a plain top-level
|
||||
// window, never transient/modal, so design, palette and code windows
|
||||
// coexist. Closing it only hides it; View -> Widget Palette brings it
|
||||
// back.
|
||||
|
||||
static void palette_window_show() {
|
||||
if (!g_palette_window) return;
|
||||
gtk_widget_show_all(g_palette_window);
|
||||
gtk_window_present(GTK_WINDOW(g_palette_window));
|
||||
}
|
||||
|
||||
static void palette_window_hide() {
|
||||
if (g_palette_window) gtk_widget_hide(g_palette_window);
|
||||
}
|
||||
|
||||
static gboolean on_palette_window_delete(GtkWidget*, GdkEvent*,
|
||||
gpointer) {
|
||||
// Close button hides the palette instead of destroying it, so the
|
||||
// app keeps running and the palette can be reopened.
|
||||
if (g_palette_menu_item)
|
||||
gtk_check_menu_item_set_active(
|
||||
GTK_CHECK_MENU_ITEM(g_palette_menu_item), FALSE);
|
||||
gtk_widget_hide(g_palette_window);
|
||||
return TRUE; // do not destroy
|
||||
}
|
||||
|
||||
static void on_view_palette_toggled(GtkCheckMenuItem* item, gpointer) {
|
||||
if (gtk_check_menu_item_get_active(item)) palette_window_show();
|
||||
else palette_window_hide();
|
||||
}
|
||||
|
||||
static gboolean on_canvas_press(GtkWidget*, GdkEventButton* e, gpointer) {
|
||||
if (e->button == 1) select_item(nullptr); // clicked empty canvas
|
||||
return FALSE;
|
||||
@@ -3747,8 +3782,10 @@ int main(int argc, char** argv) {
|
||||
g_props_box = GTK_WIDGET(gtk_builder_get_object(builder, "props_box"));
|
||||
g_selected_label =
|
||||
GTK_WIDGET(gtk_builder_get_object(builder, "selected_label"));
|
||||
g_palette_window =
|
||||
GTK_WIDGET(gtk_builder_get_object(builder, "palette_window"));
|
||||
if (!g_window || !g_canvas || !g_statusbar || !g_props_grid ||
|
||||
!g_props_box || !g_selected_label) {
|
||||
!g_props_box || !g_selected_label || !g_palette_window) {
|
||||
std::fprintf(stderr, "fdesigner: designer.ui is missing core objects\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -3836,6 +3873,16 @@ int main(int argc, char** argv) {
|
||||
});
|
||||
}),
|
||||
nullptr);
|
||||
// View menu -> widget palette window (show/hide toggle).
|
||||
GObject* mi_pal = gtk_builder_get_object(builder, "mi_view_palette");
|
||||
if (mi_pal) {
|
||||
g_palette_menu_item = GTK_WIDGET(mi_pal);
|
||||
g_signal_connect(mi_pal, "toggled",
|
||||
G_CALLBACK(on_view_palette_toggled), nullptr);
|
||||
}
|
||||
g_signal_connect(g_palette_window, "delete-event",
|
||||
G_CALLBACK(on_palette_window_delete), nullptr);
|
||||
|
||||
// Debug menu -> stepping debugger window / settings.
|
||||
GObject* mi_dbg = gtk_builder_get_object(builder, "mi_debug_open");
|
||||
if (mi_dbg)
|
||||
@@ -3901,6 +3948,43 @@ int main(int argc, char** argv) {
|
||||
status("Phase 2 — pick a widget from the palette to place it");
|
||||
gtk_widget_show_all(g_window);
|
||||
|
||||
// Palette window: its own top-level window, opened together with the
|
||||
// designer and parked to the left of the design window (right if
|
||||
// there is no room on the left). Plain top-level, not transient or
|
||||
// modal, so it never blocks the canvas.
|
||||
if (g_palette_window) {
|
||||
// [palette-window] Tight Lazarus-style packing: small buttons,
|
||||
// minimal padding, no whitespace between rows. USER priority so
|
||||
// it wins over the application theme/font providers.
|
||||
GtkCssProvider* pal_css = gtk_css_provider_new();
|
||||
gtk_css_provider_load_from_data(
|
||||
pal_css,
|
||||
"#palette_window button { min-height: 20px; padding: 1px 4px; }"
|
||||
"#palette_window button label { padding: 0px; }"
|
||||
"#palette_window label { padding: 0px; }",
|
||||
-1, nullptr);
|
||||
gtk_style_context_add_provider(
|
||||
gtk_widget_get_style_context(g_palette_window),
|
||||
GTK_STYLE_PROVIDER(pal_css),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||
gtk_widget_show_all(g_palette_window);
|
||||
while (gtk_events_pending()) gtk_main_iteration();
|
||||
gint mx = 0, my = 0, mw = 0;
|
||||
gtk_window_get_position(GTK_WINDOW(g_window), &mx, &my);
|
||||
gtk_window_get_size(GTK_WINDOW(g_window), &mw, nullptr);
|
||||
gint pw = 0;
|
||||
gtk_window_get_size(GTK_WINDOW(g_palette_window), &pw, nullptr);
|
||||
gint px = (mx >= pw + 12) ? mx - pw - 12 : mx + mw + 12;
|
||||
GdkRectangle mgeo = {0, 0, 1920, 1080};
|
||||
GdkMonitor* mon = gdk_display_get_primary_monitor(
|
||||
gdk_screen_get_display(gdk_screen_get_default()));
|
||||
if (mon) gdk_monitor_get_geometry(mon, &mgeo);
|
||||
gint sw = mgeo.width;
|
||||
if (px + pw > sw) px = sw - pw - 4;
|
||||
if (px < 0) px = 0;
|
||||
gtk_window_move(GTK_WINDOW(g_palette_window), px, my);
|
||||
}
|
||||
|
||||
if (std::getenv("FDESIGNER_OPEN_DEBUGGER") != nullptr)
|
||||
g_idle_add(+[](gpointer) -> gboolean {
|
||||
debugger_window_open(g_window);
|
||||
|
||||
Executable
+162
@@ -0,0 +1,162 @@
|
||||
#!/usr/bin/env bash
|
||||
# Palette-window tests: the widget palette is its own top-level window
|
||||
# ("FDesigner — Widgets"), tight 2-column Lazarus-style grid, opens with
|
||||
# the designer, closes (hide, app survives) and reopens from View menu.
|
||||
# Uses a tiny Xlib helper to send a real WM_DELETE_WINDOW (xdotool
|
||||
# windowclose destroys the X window outright under bare Xvfb, which is
|
||||
# not what a window manager does).
|
||||
set -u
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
pass=0; fail=0; failed=""
|
||||
ok() { echo "PASS $1"; pass=$((pass+1)); }
|
||||
bad() { echo "FAIL $1"; fail=$((fail+1)); failed="$failed $1"; }
|
||||
|
||||
# Re-run the body under Xvfb when no display is set.
|
||||
if [ -z "${DISPLAY:-}" ]; then
|
||||
PALETTE_TEST_IN_XVFB=1 xvfb-run -a -s "-screen 0 2560x1440x24" "$0"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
echo "== building fdesigner =="
|
||||
if make > /tmp/palette_make.log 2>&1; then ok make; else
|
||||
bad make; cat /tmp/palette_make.log; exit 1
|
||||
fi
|
||||
|
||||
echo "== building Xlib close helper =="
|
||||
cat > /tmp/palette_wmclose.c << "C_EOF"
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
int main(int argc, char** argv) {
|
||||
Display* d = XOpenDisplay(NULL);
|
||||
if (!d) return 2;
|
||||
Window w = (Window)strtoul(argv[1], NULL, 0);
|
||||
Atom trans = XInternAtom(d, "WM_TRANSIENT_FOR", False);
|
||||
Atom actual; int fmt; unsigned long n, extra; unsigned char* prop = NULL;
|
||||
XGetWindowProperty(d, w, trans, 0, 1, False, XA_WINDOW,
|
||||
&actual, &fmt, &n, &extra, &prop);
|
||||
printf("TRANSIENT=%lu\n", n);
|
||||
if (prop) XFree(prop);
|
||||
Atom protos = XInternAtom(d, "WM_PROTOCOLS", False);
|
||||
Atom del = XInternAtom(d, "WM_DELETE_WINDOW", False);
|
||||
Atom* plist = NULL; int count = 0, has_del = 0;
|
||||
if (XGetWMProtocols(d, w, &plist, &count)) {
|
||||
for (int i = 0; i < count; i++) if (plist[i] == del) has_del = 1;
|
||||
XFree(plist);
|
||||
}
|
||||
printf("DELETE_PROTOCOL=%d\n", has_del);
|
||||
if (argc > 2 && !strcmp(argv[2], "close")) {
|
||||
XEvent ev; memset(&ev, 0, sizeof(ev));
|
||||
ev.xclient.type = ClientMessage;
|
||||
ev.xclient.window = w;
|
||||
ev.xclient.message_type = protos;
|
||||
ev.xclient.format = 32;
|
||||
ev.xclient.data.l[0] = del;
|
||||
ev.xclient.data.l[1] = CurrentTime;
|
||||
XSendEvent(d, w, False, NoEventMask, &ev);
|
||||
XSync(d, False);
|
||||
printf("SENT_CLOSE\n");
|
||||
}
|
||||
XCloseDisplay(d);
|
||||
return 0;
|
||||
}
|
||||
C_EOF
|
||||
if gcc -O2 -Wall -Wextra -o /tmp/palette_wmclose /tmp/palette_wmclose.c -lX11 \
|
||||
> /tmp/palette_wmclose_build.log 2>&1; then ok wmclose-helper-build;
|
||||
else bad wmclose-helper-build; cat /tmp/palette_wmclose_build.log; exit 1; fi
|
||||
|
||||
echo "== launching designer under Xvfb ($DISPLAY) =="
|
||||
./fdesigner > /tmp/palette_app.log 2>&1 &
|
||||
APP_PID=$!
|
||||
trap 'kill $APP_PID 2>/dev/null || true' EXIT
|
||||
sleep 3
|
||||
if ! kill -0 $APP_PID 2>/dev/null; then
|
||||
bad "app-start"; cat /tmp/palette_app.log; exit 1
|
||||
fi
|
||||
ok app-start
|
||||
|
||||
MAIN=$(xdotool search --name "FDesigner — C\+\+/GTK" | head -1)
|
||||
PAL=$(xdotool search --name "FDesigner — Widgets" | head -1)
|
||||
[ -n "$MAIN" ] && ok main-window || bad main-window
|
||||
[ -n "$PAL" ] && ok palette-window || bad palette-window
|
||||
if [ -n "$MAIN" ] && [ -n "$PAL" ] && [ "$MAIN" != "$PAL" ]; then
|
||||
ok distinct-windows
|
||||
else bad distinct-windows; fi
|
||||
|
||||
# Palette must be a plain top-level window, not transient/modal.
|
||||
if [ -n "$PAL" ]; then
|
||||
OUT=$(/tmp/palette_wmclose "$PAL")
|
||||
echo "$OUT" | grep -q "TRANSIENT=0" && ok not-transient || bad not-transient
|
||||
echo "$OUT" | grep -q "DELETE_PROTOCOL=1" && ok delete-protocol || \
|
||||
bad delete-protocol
|
||||
fi
|
||||
|
||||
# Palette parked beside the designer (left or right, not overlapping it).
|
||||
geom() { # $1 = window id, $2/$3 = name prefix for X/Y/W/H vars
|
||||
eval "$(xdotool getwindowgeometry "$1" | sed -n \
|
||||
-e 's/ *Position: \([0-9]*\),\([0-9]*\).*/'"$2"'X=\1; '"$2"'Y=\2/p' \
|
||||
-e 's/ *Geometry: \([0-9]*\)x\([0-9]*\)/'"$2"'W=\1; '"$2"'H=\2/p')"
|
||||
}
|
||||
if [ -n "$MAIN" ] && [ -n "$PAL" ]; then
|
||||
geom "$MAIN" M
|
||||
geom "$PAL" P
|
||||
echo "main ${MW}x${MH}@${MX},${MY} palette ${PW}x${PH}@${PX},${PY}"
|
||||
if [ "$PX" -eq $((MX - PW - 12)) ] || [ "$PX" -eq $((MX + MW + 12)) ]; then
|
||||
ok palette-beside-main
|
||||
else bad palette-beside-main; fi
|
||||
if [ "$PW" -ge 200 ] && [ "$PW" -le 300 ]; then ok palette-width;
|
||||
else bad palette-width; fi
|
||||
fi
|
||||
|
||||
# Clicking palette buttons places widgets on the canvas: screenshot the
|
||||
# canvas corner before/after clicking Button, then Memo (Lazarus).
|
||||
if [ -n "$PAL" ] && [ -n "$MAIN" ]; then
|
||||
CX=$((MX + 10)); CY=$((MY + 30))
|
||||
import -window root -crop 500x220+${CX}+${CY} /tmp/palette_before.png
|
||||
# First button (Button, left column, first grid row).
|
||||
xdotool mousemove $((PX + 62)) $((PY + 39)) click 1; sleep 0.7
|
||||
# Memo button (Lazarus — Basic, left column).
|
||||
xdotool mousemove $((PX + 62)) $((PY + 350)) click 1; sleep 0.7
|
||||
import -window root -crop 500x220+${CX}+${CY} /tmp/palette_after.png
|
||||
DIFF=$(compare -metric AE -fuzz 5% /tmp/palette_before.png \
|
||||
/tmp/palette_after.png /tmp/palette_diff.png 2>&1 || true)
|
||||
echo "canvas pixel diff: $DIFF"
|
||||
if [ "${DIFF:-0}" -gt 1000 ] 2>/dev/null; then ok palette-places-widgets;
|
||||
else bad palette-places-widgets; fi
|
||||
fi
|
||||
|
||||
# Closing the palette (real WM close) hides it; the app stays alive.
|
||||
if [ -n "$PAL" ]; then
|
||||
/tmp/palette_wmclose "$PAL" close > /tmp/palette_close.log 2>&1
|
||||
sleep 1
|
||||
if [ -z "$(xdotool search --onlyvisible --name "FDesigner — Widgets")" ]; then
|
||||
ok palette-hides-on-close
|
||||
else bad palette-hides-on-close; fi
|
||||
if kill -0 $APP_PID 2>/dev/null && \
|
||||
[ -n "$(xdotool search --onlyvisible --name "FDesigner — C\+\+/GTK")" ]; then
|
||||
ok app-alive-after-close
|
||||
else bad app-alive-after-close; fi
|
||||
# Reopen from View -> Widget Palette (menu coords from main geometry).
|
||||
xdotool mousemove $((MX + 110)) $((MY + 12)) click 1; sleep 0.8
|
||||
xdotool mousemove $((MX + 141)) $((MY + 89)) click 1; sleep 1
|
||||
if [ -n "$(xdotool search --onlyvisible --name "FDesigner — Widgets")" ]; then
|
||||
ok palette-reopens-from-view-menu
|
||||
else bad palette-reopens-from-view-menu; fi
|
||||
# Clicking the canvas still works after palette + design interplay.
|
||||
xdotool mousemove $((MX + 300)) $((MY + 400)) click 1; sleep 0.5
|
||||
kill -0 $APP_PID 2>/dev/null && ok canvas-click-after-reopen || \
|
||||
bad canvas-click-after-reopen
|
||||
fi
|
||||
|
||||
# No GTK warnings/criticals from the palette windows in the app log.
|
||||
if grep -qE "Gtk-CRITICAL|Gdk-WARNING" /tmp/palette_app.log; then
|
||||
bad "app-log-warnings"; grep -E "Gtk-CRITICAL|Gdk-WARNING" /tmp/palette_app.log
|
||||
else ok app-log-clean; fi
|
||||
|
||||
kill $APP_PID 2>/dev/null || true
|
||||
trap - EXIT
|
||||
echo "== palette_window_tests: $pass passed, $fail failed ==$failed"
|
||||
[ $fail -eq 0 ]
|
||||
+526
-271
@@ -118,6 +118,13 @@
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="mi_view_palette">
|
||||
<property name="label">Widget Palette</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -202,277 +209,6 @@
|
||||
<object class="GtkPaned" id="main_paned">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="palette_scroll">
|
||||
<property name="width_request">170</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="palette_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="palette_label">
|
||||
<property name="label"><b>Widgets</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_button">
|
||||
<property name="label">Button</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_label">
|
||||
<property name="label">Label</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_entry">
|
||||
<property name="label">Entry</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_checkbutton">
|
||||
<property name="label">CheckButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_radiobutton">
|
||||
<property name="label">RadioButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_frame">
|
||||
<property name="label">Frame</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_combobox">
|
||||
<property name="label">ComboBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_listbox">
|
||||
<property name="label">ListBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_menubutton">
|
||||
<property name="label">MenuButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_canvas">
|
||||
<property name="label">Canvas</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scale">
|
||||
<property name="label">Scale</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scrollbar">
|
||||
<property name="label">Scrollbar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_text">
|
||||
<property name="label">Text</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_toplevel">
|
||||
<property name="label">Toplevel</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_spreadsheet">
|
||||
<property name="label">Spreadsheet</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_stockchart">
|
||||
<property name="label">StockChart</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_lazarus">
|
||||
<property name="label"><b>Lazarus — Basic</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_memo">
|
||||
<property name="label">Memo</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_groupbox">
|
||||
<property name="label">GroupBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_panel">
|
||||
<property name="label">Panel</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_image">
|
||||
<property name="label">Image</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_shape">
|
||||
<property name="label">Shape</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_containers">
|
||||
<property name="label"><b>Containers</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_notebook">
|
||||
<property name="label">Notebook</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scrollbox">
|
||||
<property name="label">ScrollBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_splitter">
|
||||
<property name="label">Splitter</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_statusbar">
|
||||
<property name="label">StatusBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_toolbar">
|
||||
<property name="label">ToolBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_menubar">
|
||||
<property name="label">MenuBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_input">
|
||||
<property name="label"><b>Input</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_spinedit">
|
||||
<property name="label">SpinEdit</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_trackbar">
|
||||
<property name="label">TrackBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_progressbar">
|
||||
<property name="label">ProgressBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_datetimepicker">
|
||||
<property name="label">DateTimePicker</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_colorbox">
|
||||
<property name="label">ColorBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_data">
|
||||
<property name="label"><b>Data / Display</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_listview">
|
||||
<property name="label">ListView</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_treeview">
|
||||
<property name="label">TreeView</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_stringgrid">
|
||||
<property name="label">StringGrid</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_plot">
|
||||
<property name="label">Plot</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPaned" id="canvas_props_paned">
|
||||
<property name="orientation">horizontal</property>
|
||||
@@ -554,4 +290,523 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkWindow" id="palette_window">
|
||||
<property name="title">FDesigner — Widgets</property>
|
||||
<property name="default_width">250</property>
|
||||
<property name="default_height">780</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="palette_scroll">
|
||||
<property name="width_request">230</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="palette_box">
|
||||
<property name="row_spacing">2</property>
|
||||
<property name="column_spacing">2</property>
|
||||
<property name="margin_start">2</property>
|
||||
<property name="margin_end">2</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="palette_label">
|
||||
<property name="label"><b>Widgets</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_button">
|
||||
<property name="label">Button</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_label">
|
||||
<property name="label">Label</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_entry">
|
||||
<property name="label">Entry</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_checkbutton">
|
||||
<property name="label">CheckButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_radiobutton">
|
||||
<property name="label">RadioButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_frame">
|
||||
<property name="label">Frame</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_combobox">
|
||||
<property name="label">ComboBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_listbox">
|
||||
<property name="label">ListBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_menubutton">
|
||||
<property name="label">MenuButton</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_canvas">
|
||||
<property name="label">Canvas</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scale">
|
||||
<property name="label">Scale</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scrollbar">
|
||||
<property name="label">Scrollbar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_text">
|
||||
<property name="label">Text</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_toplevel">
|
||||
<property name="label">Toplevel</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_spreadsheet">
|
||||
<property name="label">Spreadsheet</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_stockchart">
|
||||
<property name="label">StockChart</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_lazarus">
|
||||
<property name="label"><b>Lazarus — Basic</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_memo">
|
||||
<property name="label">Memo</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">10</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_groupbox">
|
||||
<property name="label">GroupBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">10</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_panel">
|
||||
<property name="label">Panel</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">11</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_image">
|
||||
<property name="label">Image</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">11</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_shape">
|
||||
<property name="label">Shape</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">12</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_containers">
|
||||
<property name="label"><b>Containers</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">13</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_notebook">
|
||||
<property name="label">Notebook</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">14</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_scrollbox">
|
||||
<property name="label">ScrollBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">14</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_splitter">
|
||||
<property name="label">Splitter</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">15</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_statusbar">
|
||||
<property name="label">StatusBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">15</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_toolbar">
|
||||
<property name="label">ToolBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">16</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_menubar">
|
||||
<property name="label">MenuBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">16</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_input">
|
||||
<property name="label"><b>Input</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">17</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_spinedit">
|
||||
<property name="label">SpinEdit</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">18</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_trackbar">
|
||||
<property name="label">TrackBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">18</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_progressbar">
|
||||
<property name="label">ProgressBar</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">19</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_datetimepicker">
|
||||
<property name="label">DateTimePicker</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">19</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_colorbox">
|
||||
<property name="label">ColorBox</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">20</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="pal_section_data">
|
||||
<property name="label"><b>Data / Display</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">21</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_listview">
|
||||
<property name="label">ListView</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">22</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_treeview">
|
||||
<property name="label">TreeView</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">22</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_stringgrid">
|
||||
<property name="label">StringGrid</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">23</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="pal_plot">
|
||||
<property name="label">Plot</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">23</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
Reference in new issue
Block a user