Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename things #330

Merged
merged 15 commits into from
Jul 1, 2022
Merged

Rename things #330

merged 15 commits into from
Jul 1, 2022

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Jul 1, 2022

This attempts to address some less-than-ideal names, before such changes would break too many user's code.

  • Consider "check box" and "scroll bar" to be two words, not "checkbox" and "scrollbar". Previously this was inconsistent (e.g. scrollbar, ScrollBar). Arguably "scrollbar" might be considered a word today, but consistency is important and "progressbar" is definitely not.
  • Rename CheckBox to CheckButton (with label) and CheckBoxBare to CheckBox (without label). Do the same for RadioBox*.
  • Rename RadioBoxGroup to RadioGroup
  • Rename SetRectMgr to ConfigMgr: it's a special type used when configuring things (Widget::configure, Layout::set_rect, Layout::spatial_nav). No obvious perfect choice.

There are still some widgets with non-typical names where it was decided to keep these:

  • EditBox, EditField (same without the box): other frameworks might call these Input, TextInput, TextEdit, EditText, Entry (there's actually not much consistency here). Some of these names are only for single/multi-line widgets; our widget supports both modes. We also have an associated trait, EditGuard, which fits well with the current names.
  • TabStack is a descriptive name: a stack with tabs (compare Tabs, Qt's TabWidget or GTK's Notebook).
  • DragHandle might be better named Grip or something... in any case, it's not a widely used widget.

Finally:

  • Move Widget::make_child_id to WidgetChildren, which already houses the "reverse" method, find_child_index. Current widgets with non-default implementations all implement WidgetChildren directly already.

@dhardy dhardy merged commit a13ca3e into master Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant