110 wxBitmapButton*
dummy =
112 wxDefaultPosition, wxDefaultSize, wxBORDER_NONE );
113 wxSize bitmapSize =
dummy->GetSize();
117 const wxSize text_padding( 2, 1 );
118 const int twiddle = -1;
120 const wxSize text_padding( 8, 6 );
121 const int twiddle = 1;
125 wxPoint pos( 0, charSize.y * 2 );
130 std::vector<wxStaticText*> labels;
135 int y = pos.y + ( ii * ( bitmapSize.y + text_padding.y ) );
137 wxPoint( 5, y + ( bitmapSize.y / 2 ) - ( 12 / 2 ) ) );
138 labels.push_back(
text );
140 int x =
text->GetRect().GetRight();
141 pos.x = std::max( pos.x, x );
147 wxPoint labelPos = labels[ ii ]->GetPosition();
148 labelPos.x = pos.x - labels[ ii ]->GetRect().GetWidth();
149 labelPos.y += twiddle;
150 labels[ ii ]->SetPosition( labelPos );
162 int y = pos.y + (ii * ( bitmapSize.y + text_padding.y ) );
164 for(
int jj = 0; jj <= ii; jj++ )
169 int x = pos.x + ( jj * ( bitmapSize.x + text_padding.x ) );
173 wxPoint textPos( x +
KiROUND( bitmapSize.x / 2.0 ),
174 y - charSize.y * 2 );
177 wxPoint calloutPos( x +
KiROUND( bitmapSize.x / 2.0 ),
179 new wxStaticText(
m_matrixPanel, wxID_ANY,
"|", calloutPos );
187 wxPoint( x, y ), bitmapSize );
197 wxBitmapButton* btn =
199 wxPoint( x, y ), wxDefaultSize, wxBORDER_NONE );
203 btn->SetSize( btn->GetSize() + text_padding );
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
KICOMMON_API wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...