Browse Source

Move Help into its own file

This cleans up the already large FileHelper.cake, especially if I plan
on frequently changing either file.
filter-focus
Macoy Madson 1 year ago
parent
commit
3127672817
  1. 77
      src/FileHelper.cake
  2. 80
      src/Help.cake

77
src/FileHelper.cake

@ -5,6 +5,7 @@
;; From File Helper
"FileSystem.cake" "LoadSave.cake" "Export.cake" "Utilities.cake"
"Treemap.cake" "TreemapOpenGL.cake" "TreemapFileSystem.cake" "License.cake"
"Help.cake"
;; From cakelisp
"FileUtilities.cake"
&comptime-only
@ -1177,82 +1178,6 @@
(imgui-call End)
(return colorizers-changed))
(defun-local imgui-fill-help-window ()
(imgui-call TextWrapped
"Welcome to File Helper!\n
\n
This application helps you categorize your files.\n
By categorizing your files, you can more easily manage them:")
(imgui-call Bullet) (imgui-call TextWrapped "Know which files you care about, so you can back them up")
(imgui-call Bullet) (imgui-call TextWrapped "Mark which files you can delete when you run low on space")
(imgui-call Separator)
(when (imgui-call CollapsingHeader "Categories")
(imgui-call TextWrapped "The categories you choose are up to you.\n
For example, I might have these categories:")
(imgui-call Bullet) (imgui-call Text "Backup")
(imgui-call Bullet) (imgui-call Text "Configuration")
(imgui-call Bullet) (imgui-call Text "Media")
(imgui-call Bullet) (imgui-call Text "System")
(imgui-call TextWrapped "While the example given focused on helping decide which files to back up,
you can use the tool to organize your music by genre, mark files by importance, etc.")
(imgui-call TextWrapped "File helper is designed to have a very efficient user interface to
assist you in quickly performing any file categorization task.")
(imgui-call Bullet)
(imgui-call TextWrapped "Categories are inherited from parent directories. You may override
inherited categories.")
(imgui-call Bullet)
(imgui-call TextWrapped "When the majority of entries share the same category, you can mark the
parent directory as that category instead, then exclude files which do not match by setting their
appropriate categories as overrides"))
(when (imgui-call CollapsingHeader "Directory Browser")
(imgui-call TextWrapped "The Directory Browser is the primary interface for traversing and
categorizing your file system.")
(imgui-call Text "Keyboard controls")
(imgui-call Bullet)
(imgui-call TextWrapped "Using the keyboard is the most efficient way to categorize your file
system in File Helper.")
(imgui-call Bullet)
(imgui-call TextWrapped "To see keyboard controls, hover over the")
(imgui-call SameLine) (imgui-call TextDisabled "(?)")
(imgui-call Bullet)
(imgui-call TextWrapped "After applying a category via the keyboard, the next row will automatically be selected.")
(imgui-call Text "Mouse controls")
(imgui-call Bullet)
(imgui-call TextWrapped "Quickly double-click a directory in order to enter it, or click the dir button.")
(imgui-call Bullet) (imgui-call TextWrapped "When using the mouse, use the Use * button to more
quickly apply categories to files. This button uses the last applied category, or the one you last
selected in the Category Key."))
(when (imgui-call CollapsingHeader "Treemap")
(imgui-call TextWrapped "The Treemap view visualizes file sizes with rectangles. The larger the
rectangle, the larger the file. The sizing is determined relative to all other files in the
directory the Treemap is showing.")
(imgui-call Bullet)
(imgui-call TextWrapped "Click on any file in the Treemap to jump to it in the Directory Browser.")
(imgui-call Bullet)
(imgui-call TextWrapped "Use the File Colorizers window to change the colors of the file
rectangles based on their extensions. This makes it easy to see at a glance what types of files are
on your drive, and how much space they are occupying."))
(when (imgui-call CollapsingHeader "Using the categorizations")
(imgui-call TextWrapped "File Helper is designed as a tool for generic categorization. You can
use the data in any way.")
(imgui-call TextWrapped "For example, I can use the list of entries in my Backup category along
with the rsync tool to copy all my Backup files to a separate drive.")
(imgui-call Bullet)
(imgui-call TextWrapped "Click the \"Export all to text\" button to output these files")
(imgui-call Bullet)
(imgui-call TextWrapped "Entries in the associated category file are \"pure\": they do not
contain any other categories"))
(when (imgui-call CollapsingHeader "User Interface")
(imgui-call ShowUserGuide))
(when (imgui-call CollapsingHeader "Help & Feedback")
(imgui-call TextWrapped "Email macoy@macoy.me for any help, feedback, or suggestions you have.")))
(defmacro sprintf-to-char-array (buffer-name symbol buffer-size any on-buffer-full any
format-string string &optional &rest format-arguments any)
(tokenize-push output

80
src/Help.cake

@ -0,0 +1,80 @@
(import "ImGui.cake")
;; TODO: ImGui.cake import should infect me with this automatically
(c-import "imgui.h")
(add-c-search-directory-module "Dependencies/imgui")
(defun imgui-fill-help-window ()
(imgui-call TextWrapped
"Welcome to File Helper!\n
\n
This application helps you categorize your files.\n
By categorizing your files, you can more easily manage them:")
(imgui-call Bullet) (imgui-call TextWrapped "Know which files you care about, so you can back them up")
(imgui-call Bullet) (imgui-call TextWrapped "Mark which files you can delete when you run low on space")
(imgui-call Separator)
(when (imgui-call CollapsingHeader "Categories")
(imgui-call TextWrapped "The categories you choose are up to you.\n
For example, I might have these categories:")
(imgui-call Bullet) (imgui-call Text "Backup")
(imgui-call Bullet) (imgui-call Text "Configuration")
(imgui-call Bullet) (imgui-call Text "Media")
(imgui-call Bullet) (imgui-call Text "System")
(imgui-call TextWrapped "While the example given focused on helping decide which files to back up,
you can use the tool to organize your music by genre, mark files by importance, etc.")
(imgui-call TextWrapped "File helper is designed to have a very efficient user interface to
assist you in quickly performing any file categorization task.")
(imgui-call Bullet)
(imgui-call TextWrapped "Categories are inherited from parent directories. You may override
inherited categories.")
(imgui-call Bullet)
(imgui-call TextWrapped "When the majority of entries share the same category, you can mark the
parent directory as that category instead, then exclude files which do not match by setting their
appropriate categories as overrides"))
(when (imgui-call CollapsingHeader "Directory Browser")
(imgui-call TextWrapped "The Directory Browser is the primary interface for traversing and
categorizing your file system.")
(imgui-call Text "Keyboard controls")
(imgui-call Bullet)
(imgui-call TextWrapped "Using the keyboard is the most efficient way to categorize your file
system in File Helper.")
(imgui-call Bullet)
(imgui-call TextWrapped "To see keyboard controls, hover over the")
(imgui-call SameLine) (imgui-call TextDisabled "(?)")
(imgui-call Bullet)
(imgui-call TextWrapped "After applying a category via the keyboard, the next row will automatically be selected.")
(imgui-call Text "Mouse controls")
(imgui-call Bullet)
(imgui-call TextWrapped "Quickly double-click a directory in order to enter it, or click the dir button.")
(imgui-call Bullet) (imgui-call TextWrapped "When using the mouse, use the Use * button to more
quickly apply categories to files. This button uses the last applied category, or the one you last
selected in the Category Key."))
(when (imgui-call CollapsingHeader "Treemap")
(imgui-call TextWrapped "The Treemap view visualizes file sizes with rectangles. The larger the
rectangle, the larger the file. The sizing is determined relative to all other files in the
directory the Treemap is showing.")
(imgui-call Bullet)
(imgui-call TextWrapped "Click on any file in the Treemap to jump to it in the Directory Browser.")
(imgui-call Bullet)
(imgui-call TextWrapped "Use the File Colorizers window to change the colors of the file
rectangles based on their extensions. This makes it easy to see at a glance what types of files are
on your drive, and how much space they are occupying."))
(when (imgui-call CollapsingHeader "Using the categorizations")
(imgui-call TextWrapped "File Helper is designed as a tool for generic categorization. You can
use the data in any way.")
(imgui-call TextWrapped "For example, I can use the list of entries in my Backup category along
with the rsync tool to copy all my Backup files to a separate drive.")
(imgui-call Bullet)
(imgui-call TextWrapped "Click the \"Export all to text\" button to output these files")
(imgui-call Bullet)
(imgui-call TextWrapped "Entries in the associated category file are \"pure\": they do not
contain any other categories"))
(when (imgui-call CollapsingHeader "User Interface")
(imgui-call ShowUserGuide))
(when (imgui-call CollapsingHeader "Help & Feedback")
(imgui-call TextWrapped "Email macoy@macoy.me for any help, feedback, or suggestions you have.")))
Loading…
Cancel
Save