TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::FileIcons Class Reference

The OS's icon for a file or folder, registered with a text system as a picture icon (ITextSystem::RegisterIconFromPixels). More...

#include <gui_controls/gui_file_icons.h>

Public Member Functions

 FileIcons (ITextSystem &textSystem, uint32_t pixels=48)
IconID Get (std::string_view name, bool isFolder)
IconID OpenFolder ()
 A folder's icon while it's open, or while something is dragged over it.

Static Public Member Functions

static std::string Extension (std::string_view name)
 The extension Get goes by: from the last '.

Detailed Description

The OS's icon for a file or folder, registered with a text system as a picture icon (ITextSystem::RegisterIconFromPixels).

One per extension, matched without case, and one for folders; each is read once. Read from the Windows shell, from the size of icon at least pixels square it has (16, 32, 48 or 256, scaled with the display); elsewhere, and when the shell has none, Get gives IconID::Invalid and a view shows its own.

Constructor & Destructor Documentation

◆ FileIcons()

tachyon::FileIcons::FileIcons ( ITextSystem & textSystem,
uint32_t pixels = 48 )
explicit

Member Function Documentation

◆ Get()

IconID tachyon::FileIcons::Get ( std::string_view name,
bool isFolder )

◆ OpenFolder()

IconID tachyon::FileIcons::OpenFolder ( )

A folder's icon while it's open, or while something is dragged over it.

◆ Extension()

std::string tachyon::FileIcons::Extension ( std::string_view name)
static

The extension Get goes by: from the last '.

', lowercase ASCII; "" for none, and for a name that only starts with a '.'.


The documentation for this class was generated from the following file: