2017-19 Color Center 🎨

    • C++➕, Featured⭐️, New, Open Source, Programs📈

⏱️Overview

This is a program I wrote specifically to aid in managing my coloring patterns in file managers. For both Double Commander and Total Commander.

📜History

I was using Total Commander since about 1999, back when it was called Windows Commander. Since then I’ve gathered an already quite big list of file extensions for own coloring. The list even has colors for directories and my own rating symbols.

I’m using Double Commander more now and having my list in it is essential. It also needs a bit of order changing to have similar result in both. E.g. for directories, links, executables. I also started a fork of DC with my own tweaks.

✍️Motivation

Because both commanders are clunky at managing such big lists, I’ve decided to write my own program that will allow doing it efficiently and fast. And by the way it will be usable for both commanders. This way I can now just use it and get my list exported directly into each commander’s settings files, without editing it there at all.


🔍Implementation

The program is written in modern C++11. It was a good step forward into learning it in practice, since all my previous programs and games were tied to C++03. Since I also switched to using GCC, more recent C++ features are available.

It uses SFML library, which allows easily having windows, graphics, shaders, threads, sounds etc. So without too much code and while also being cross platform. Which is important to let me use my own programs on GNU/Linux too.

Gui

I started using SFML already a few years back. But only for drawing text. This time I went further and looked around for a GUI system for SFML. I checked out SFGui and TGui which are good, have themes, most controls, but other that that are basic and need a lot of code for simplest things, same like e.g. MyGui did.

So my interest settled with ImGui which has an abundance of possible Gui controls and demos (on first page, and even more in topics). It is famous for debug panels in games and even is used in editors for games. The main downsides are no texturing of controls (just one color) and no editor for layout. Since you just create it in code, where also events are handled. This immediate mode approach is interesting and allows quick developing. Of course not for each purpose. For use with SFML it needs a helper library ImGui-SFML.

📖Tutorials

I’ve put it all together with CMake and using Qt Creator as IDE. This will probably serve as a base for many of my programs. It is easy to compile on GNU/Linux, as it needs only SFML installed, rest is in source code. To get started using it, you can see the SFML tutorials, the tutorial(s) on connecting SFML with ImGui and my tutorials for CKeys program (earliest 3 releases here). Later checking out the ImGui demo program’s code when needed.


📂Sources

Sources are here.

📊Features

The program’s code quickly got bigger and rich with features. Some are still missing but there already are many features that allow fast and pleasant editing, which aren’t present in those commanders. For example:

  • sliders for R,G,B colors.
  • scaling font size
  • pattern search with occurrences mark, also on slider
  • groups, visibility, etc.

Also convenient are hiding, toggling directory and newly introduced groups. Groups allow putting lines with patterns together with a title and then e.g. hiding it. Later I added also visibility sets for groups, allowing to easily create other views for list. E.g. basic (public) and detailed (with my custom patterns e.g for Stunt Rally or OGRE files).

The program also has some settings, saved in XML and visible on Settings tab. It also features a Help screen with all shortcuts.

Projects made in it are saved as own XML format (using TinyXML2), where each pattern (or group) is one line. This allows easy comparing (with diff viewers) with earlier projects, and merging some changes.