changeset 25:ce3d1dc406a8

work
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 10 Apr 2025 11:41:25 -0600
parents da93a58e24aa
children ba895419fb04
files editor.luan
diffstat 1 files changed, 88 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r da93a58e24aa -r ce3d1dc406a8 editor.luan
--- a/editor.luan	Wed Apr 09 11:43:31 2025 -0600
+++ b/editor.luan	Thu Apr 10 11:41:25 2025 -0600
@@ -31,12 +31,14 @@
 local Layout = require "luan:swing/Layout.luan"
 local new_flow_layout = Layout.new_flow_layout or error()
 local new_box_layout = Layout.new_box_layout or error()
+local new_mig_layout = Layout.new_mig_layout or error()
 local Option_pane = require "luan:swing/Option_pane.luan"
 local show_message_dialog = Option_pane.show_message_dialog or error()
 local show_input_dialog = Option_pane.show_input_dialog or error()
 local new_dialog = require("luan:swing/Dialog.luan").new or error()
 local new_panel = require("luan:swing/Component.luan").new_panel or error()
 local new_button = require("luan:swing/Button.luan").new or error()
+local new_text_field = require("luan:swing/Text_field.luan").new or error()
 local Logging = require "luan:logging/Logging.luan"
 local logger = Logging.logger "editor"
 
@@ -192,10 +194,19 @@
 local function make_find_dialog(window)
 	local dialog = new_dialog{
 		owner_frame = window.frame
+--[[
 		content_pane = new_panel{
 			layout = function(this) return new_box_layout(this,"y_axis") end
 			children = {
 				new_panel{
+					layout = new_flow_layout()
+					children = {
+						new_text_field{
+							columns = 10
+						}
+					}
+				}
+				new_panel{
 					layout = new_flow_layout("left")
 					--border = create_empty_border(8,8,8,8)
 					border = create_line_border(int_to_color(0))
@@ -210,6 +221,83 @@
 				}
 			}
 		}
+]]
+--[[
+		content_pane = new_panel{
+			layout = new_grid_bag_layout()
+			alignment_x = "left"
+			border = create_line_border(int_to_color(0))
+			children = {
+				new_text_field{
+					constraints = new_grid_bag_constraints{
+						gridx = 1
+						gridy = 1
+					}
+					columns = 10
+					border = create_line_border(int_to_color(0))
+				}
+				new_panel{
+					constraints = new_grid_bag_constraints{
+						gridx = 1
+						gridy = 2
+					}
+					layout = new_flow_layout("left")
+					--border = create_empty_border(8,8,8,8)
+					border = create_line_border(int_to_color(0))
+					children = {
+						new_button{
+							text = "Find Next"
+						}
+						new_button{
+							text = "Find Previous"
+						}
+					}
+				}
+			}
+		}
+]]
+---[[
+		content_pane = new_panel{
+			layout = new_mig_layout("debug","[][grow]","[][grow,top]")
+			children = {
+				new_label{
+					text = "Find Next:"
+				}
+				new_text_field{
+					constraints = "wrap,growx"
+					columns = 20
+				}
+				new_panel{
+					constraints = "span,wrap"
+					layout = new_mig_layout("debug,insets 0")
+					--border = create_empty_border(8,8,8,8)
+					--border = create_line_border(int_to_color(0))
+					children = {
+						new_button{
+							constraints = "pad 0 -6 0 -6"
+							text = "Find Next"
+						}
+						new_button{
+							constraints = "pad 0 -18 0 -6, gap unrelated"
+							text = "Find Previous"
+						}
+					}
+				}
+				new_panel{
+					constraints = "span"
+					layout = function(this) return new_box_layout(this,"x_axis") end
+					children = {
+						new_button{
+							text = "Find Next"
+						}
+						new_button{
+							text = "Find Previous"
+						}
+					}
+				}
+			}
+		}
+--]]
 	}
 	dialog.pack()
 	local was_shown = false