-
- if ( HasFlag(wxRA_SPECIFY_COLS) ||
- (HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
- {
- for (int j = 0; j < num_of_cols; j++)
- {
- y = 15;
-
- int max_len = 0;
- wxNode *node = m_boxes.Nth( j*num_of_rows );
- for (int i1 = 0; i1< num_of_rows; i1++)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
- GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
- GdkFont *font = m_widget->style->font;
- int len = 22+gdk_string_measure( font, label->label );
- if (len > max_len) max_len = len;
-
- gtk_pizza_move( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y );
- y += 22;
-
- node = node->Next();
- if (!node) break;
- }
-
- // we don't know the max_len before
-
- node = m_boxes.Nth( j*num_of_rows );
- for (int i2 = 0; i2< num_of_rows; i2++)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
-
- gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, 20 );
-
- node = node->Next();
- if (!node) break;
- }
-
- if (y > res.y) res.y = y;
-
- x += max_len + 2;
- }
-
- res.x = x+4;
- res.y += 9;
- }
- else
- {
- int max = 0;
-
- wxNode *node = m_boxes.First();
- while (node)
- {
- GtkButton *button = GTK_BUTTON( node->Data() );
- GtkLabel *label = GTK_LABEL( button->child );
-
- GdkFont *font = m_widget->style->font;
- int len = 22+gdk_string_measure( font, label->label );
- if (len > max) max = len;
-
- node = node->Next();
- }
-
- node = m_boxes.First();
- while (node)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
-
- gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 );
- x += max;
-
- node = node->Next();
- }
- res.x = x+4;
- res.y = 40;
- }
-
- return res;