Audacity 3.2.0
Namespaces | Functions | Variables
AColor.cpp File Reference
#include "AColor.h"
#include "AColorResources.h"
#include <wx/colour.h>
#include <wx/dc.h>
#include <wx/dcmemory.h>
#include <wx/graphics.h>
#include <wx/settings.h>
#include <wx/utils.h>
#include "AllThemeResources.h"
#include "Theme.h"
Include dependency graph for AColor.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{AColor.cpp}
 

Functions

void anonymous_namespace{AColor.cpp}::DrawNinePatch (wxDC &dc, wxBitmap &bitmap, const wxRect &r)
 
int anonymous_namespace{AColor.cpp}::GetButtonImageIndex (bool up, bool selected, bool highlight)
 
wxColour InvertOfColour (const wxColour &c)
 
wxColour CursorColour ()
 

Variables

const int AColor_midicolors [16][3]
 

Function Documentation

◆ CursorColour()

wxColour CursorColour ( )

Definition at line 530 of file AColor.cpp.

531{
532 wxColour cCursor = theTheme.Colour( clrCursorPen );
533 wxColour cBack = theTheme.Colour( clrMedium );
534
535 int d = theTheme.ColourDistance( cCursor, cBack );
536
537 // Pen colour is fine, if there is plenty of contrast.
538 if( d > 200 )
539 return theTheme.Colour( clrCursorPen );
540
541 // otherwise return same colour as a selection.
542 return theTheme.Colour( clrSelected );
543}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxColour & Colour(int iIndex)
int ColourDistance(wxColour &From, wxColour &To)
Definition: Theme.cpp:307

References ThemeBase::Colour(), ThemeBase::ColourDistance(), and theTheme.

Referenced by AColor::Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InvertOfColour()

wxColour InvertOfColour ( const wxColour &  c)

Definition at line 523 of file AColor.cpp.

524{
525 return wxColour( 255-c.Red(), 255-c.Green(), 255-c.Blue() );
526}

Variable Documentation

◆ AColor_midicolors

const int AColor_midicolors[16][3]
Initial value:
= {
{255, 102, 102},
{204, 0, 0},
{255, 117, 23},
{255, 255, 0},
{0, 204, 0},
{0, 204, 204},
{125, 125, 255},
{153, 0, 255},
{140, 97, 54},
{120, 120, 120},
{255, 175, 40},
{102, 255, 102},
{153, 255, 255},
{190, 190, 255},
{204, 102, 255},
{255, 51, 204}
}

Definition at line 633 of file AColor.cpp.

Referenced by AColor::DarkMIDIChannel(), AColor::LightMIDIChannel(), and AColor::MIDIChannel().