XDGKit v0.1.0-1
XDG Utilities for C++
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
XDGIconDirectory Class Reference

Group of icons with shared properties. More...

#include <XDGIconDirectory.h>

Public Types

enum  Type
 Represents the type of the directory. More...
 
enum  SizeType
 Describes the algorithm used to determine if an icon matches a given size. More...
 
enum  Context
 Defines the context to which icons belong. More...
 

Public Member Functions

XDGKitkit () const noexcept
 Handle to the parent kit.
 
int32_t size () const noexcept
 Retrieves the nominal (unscaled) size of icons in the directory.
 
int32_t maxSize () const noexcept
 Retrieves the maximum nominal size of scalable icons.
 
int32_t minSize () const noexcept
 Retrieves the minimum nominal size of scalable icons.
 
int32_t scale () const noexcept
 Retrieves the scale factor of the icons.
 
int32_t threshold () const noexcept
 Retrieves the nominal size threshold for icons in the directory.
 
Type type () const noexcept
 Retrieves the type of the directory.
 
SizeType sizeType () const noexcept
 Retrieves the size type of the icons.
 
Context context () const noexcept
 Retrieves the context associated with the icons in the directory.
 
const char * dirName () const noexcept
 Retrieves the directory name.
 
std::filesystem::path dir () const noexcept
 Retrieves the absolute path to the icon directory.
 
const std::map< const char *, std::shared_ptr< XDGIcon > > & icons () const noexcept
 Retrieves the icons located in the directory.
 
XDGIconThemetheme () const noexcept
 Retrieves the theme to which this directory belongs.
 

Detailed Description

Group of icons with shared properties.

This class encapsulates properties of an icon directory, including its size type, scaling information, context, and the icons it contains.

Member Enumeration Documentation

◆ Type

enum Type

Represents the type of the directory.

Enumerator
Normal 

A normal icon directory.

Scaled 

A scaled icon directory.

◆ SizeType

enum SizeType

Describes the algorithm used to determine if an icon matches a given size.

Enumerator
Fixed 

Fixed size icons.

Scalable 

Scalable icons.

Threshold 

Icons with a size threshold.

◆ Context

enum Context

Defines the context to which icons belong.

Enumerator
NoContext 

No specific context.

Actions 

Icons related to actions.

Devices 

Icons related to devices.

FileSystems 

Icons related to file systems.

MimeTypes 

Icons related to MIME types.

AnyContext 

All flags

Member Function Documentation

◆ kit()

XDGKit & kit ( ) const
noexcept

Handle to the parent kit.

◆ size()

int32_t size ( ) const
inlinenoexcept

Retrieves the nominal (unscaled) size of icons in the directory.

Returns
The nominal size.

◆ maxSize()

int32_t maxSize ( ) const
inlinenoexcept

Retrieves the maximum nominal size of scalable icons.

Returns
The maximum nominal size.

◆ minSize()

int32_t minSize ( ) const
inlinenoexcept

Retrieves the minimum nominal size of scalable icons.

Returns
The minimum nominal size.

◆ scale()

int32_t scale ( ) const
inlinenoexcept

Retrieves the scale factor of the icons.

Returns
The scale factor.

◆ threshold()

int32_t threshold ( ) const
inlinenoexcept

Retrieves the nominal size threshold for icons in the directory.

Returns
The size threshold.

◆ type()

Type type ( ) const
inlinenoexcept

Retrieves the type of the directory.

Returns
The directory type (e.g., Normal or Scaled).

◆ sizeType()

SizeType sizeType ( ) const
inlinenoexcept

Retrieves the size type of the icons.

Returns
The size type (e.g., Fixed, Scalable, or Threshold).

◆ context()

Context context ( ) const
inlinenoexcept

Retrieves the context associated with the icons in the directory.

Returns
The context (e.g., Actions, Devices).

◆ dirName()

const char * dirName ( ) const
inlinenoexcept

Retrieves the directory name.

◆ dir()

std::filesystem::path dir ( ) const
noexcept

Retrieves the absolute path to the icon directory.

◆ icons()

const std::map< const char *, std::shared_ptr< XDGIcon > > & icons ( ) const
inlinenoexcept

Retrieves the icons located in the directory.

Note
Use XDKit::getString() to find the string pointer.
Returns
A constant reference to a map of icon names to their corresponding icon objects.

◆ theme()

XDGIconTheme & theme ( ) const
inlinenoexcept

Retrieves the theme to which this directory belongs.

Returns
A reference to the associated XDGIconTheme object.