summaryrefslogtreecommitdiff
path: root/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'find.c')
-rw-r--r--find.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/find.c b/find.c
new file mode 100644
index 0000000..85816ba
--- /dev/null
+++ b/find.c
@@ -0,0 +1,28 @@
+static float find_menu_height(Ted *ted) {
+ Font *font = ted->font, *font_bold = ted->font_bold;
+ float char_height = text_font_char_height(font),
+ char_height_bold = text_font_char_height(font_bold);
+ Settings const *settings = &ted->settings;
+ float padding = settings->padding;
+
+ return char_height_bold + char_height + 4 * padding;
+}
+
+static void find_menu_frame(Ted *ted) {
+ Font *font = ted->font, *font_bold = ted->font_bold;
+ float const char_height = text_font_char_height(font),
+ char_height_bold = text_font_char_height(font_bold);
+
+ Settings const *settings = &ted->settings;
+ float const padding = settings->padding;
+ float const menu_height = find_menu_height(ted);
+ float const window_width = ted->window_width, window_height = ted->window_height;
+ u32 const *colors = settings->colors;
+
+ Rect menu_bounds = rect(V2(padding, window_height - menu_height), V2(window_width - 2*padding, menu_height - padding));
+
+ gl_geometry_rect_border(menu_bounds, 1, colors[COLOR_BORDER]);
+
+ gl_geometry_draw();
+ (void)char_height; (void)char_height_bold;
+}