本文整理汇总了C++中GTK_PIZZA函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_PIZZA函数的具体用法?C++ GTK_PIZZA怎么用?C++ GTK_PIZZA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_PIZZA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gdk_window_invalidate_rect
void wxMiniFrame::SetTitle( const wxString &title )
{
wxFrame::SetTitle( title );
if (GTK_PIZZA(m_mainWidget)->bin_window)
gdk_window_invalidate_rect( GTK_PIZZA(m_mainWidget)->bin_window, NULL, true );
}
示例2: wxInsertChildInTopLevelWindow
static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow* child )
{
wxASSERT( GTK_IS_WIDGET(child->m_widget) );
if (!parent->m_insertInClientArea)
{
// these are outside the client area
wxTopLevelWindowGTK* frame = (wxTopLevelWindowGTK*) parent;
gtk_pizza_put( GTK_PIZZA(frame->m_mainWidget),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y,
child->m_width,
child->m_height );
}
else
{
// these are inside the client area
gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y,
child->m_width,
child->m_height );
}
// resize on OnInternalIdle
parent->GtkUpdateSize();
}
示例3: WXUNUSED
void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
{
wxPaintDC dc(this);
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
#ifdef __WXGTK20__
// Draw grip first
if (HasFlag( wxST_SIZEGRIP ))
{
int width, height;
GetClientSize(&width, &height);
if (GetLayoutDirection() == wxLayout_RightToLeft)
{
gtk_paint_resize_grip( m_widget->style,
GTK_PIZZA(m_wxwindow)->bin_window,
(GtkStateType) GTK_WIDGET_STATE (m_widget),
NULL,
m_widget,
"statusbar",
GDK_WINDOW_EDGE_SOUTH_WEST,
2, 2, height-2, height-4 );
}
else
{
gtk_paint_resize_grip( m_widget->style,
GTK_PIZZA(m_wxwindow)->bin_window,
(GtkStateType) GTK_WIDGET_STATE (m_widget),
NULL,
m_widget,
"statusbar",
GDK_WINDOW_EDGE_SOUTH_EAST,
width-height-2, 2, height-2, height-4 );
}
}
#endif
if (GetFont().Ok())
dc.SetFont(GetFont());
dc.SetBackgroundMode(wxTRANSPARENT);
#ifdef __WXPM__
wxColour vColor;
vColor = wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR);
::WinFillRect(dc.m_hPS, &dc.m_vRclPaint, vColor.GetPixel());
#endif
for (int i = 0; i < m_nFields; i ++)
DrawField(dc, i);
}
示例4: wxInsertChildInScrolledWindow
static void wxInsertChildInScrolledWindow( wxWindow* parent, wxWindow* child )
{
// The window might have been scrolled already, do we
// have to adapt the position.
GtkPizza *pizza = GTK_PIZZA(parent->m_wxwindow);
child->m_x += pizza->xoffset;
child->m_y += pizza->yoffset;
gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y,
child->m_width,
child->m_height );
}
示例5: gtk_pizza_map
static void
gtk_pizza_map (GtkWidget *widget)
{
GtkPizza *pizza;
GtkPizzaChild *child;
GList *children;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PIZZA (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
pizza = GTK_PIZZA (widget);
children = pizza->children;
while (children)
{
child = children->data;
children = children->next;
if ( GTK_WIDGET_VISIBLE (child->widget) &&
!GTK_WIDGET_MAPPED (child->widget) &&
!GTK_WIDGET_IS_OFFSCREEN (child->widget))
{
gtk_widget_map (child->widget);
}
}
gdk_window_show (widget->window);
gdk_window_show (pizza->bin_window);
}
示例6: gtk_pizza_forall
static void
gtk_pizza_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkPizza *pizza;
GtkPizzaChild *child;
GList *children;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_PIZZA (container));
g_return_if_fail (callback != (GtkCallback)NULL);
pizza = GTK_PIZZA (container);
children = pizza->children;
while (children)
{
child = children->data;
children = children->next;
(* callback) (child->widget, callback_data);
}
}
示例7: gtk_pizza_put
void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
{
wxFrameBase::AttachMenuBar(menuBar);
if (m_frameMenuBar)
{
m_frameMenuBar->SetParent(this);
gtk_pizza_put( GTK_PIZZA(m_mainWidget),
m_frameMenuBar->m_widget,
m_frameMenuBar->m_x,
m_frameMenuBar->m_y,
m_frameMenuBar->m_width,
m_frameMenuBar->m_height );
if (menuBar->GetWindowStyle() & wxMB_DOCKABLE)
{
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_attached",
GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
gtk_signal_connect( GTK_OBJECT(menuBar->m_widget), "child_detached",
GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
}
gtk_widget_show( m_frameMenuBar->m_widget );
UpdateMenuBarSize();
}
else
{
m_menuBarHeight = 2;
GtkUpdateSize(); // resize window in OnInternalIdle
}
}
示例8: GetClientSize
void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event)
{
#ifdef __WXGTK20__
int width, height;
GetClientSize(&width, &height);
if (HasFlag( wxST_SIZEGRIP ) && (event.GetX() > width-height))
{
GtkWidget *ancestor = gtk_widget_get_toplevel( m_widget );
if (!GTK_IS_WINDOW (ancestor))
return;
GdkWindow *source = GTK_PIZZA(m_wxwindow)->bin_window;
int org_x = 0;
int org_y = 0;
gdk_window_get_origin( source, &org_x, &org_y );
gtk_window_begin_move_drag (GTK_WINDOW (ancestor),
2,
org_x + event.GetX(),
org_y + event.GetY(),
0);
}
else
{
event.Skip( true );
}
#else
event.Skip( true );
#endif
}
示例9: gtk_pizza_size_request
static void
gtk_pizza_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkPizza *pizza;
GtkPizzaChild *child;
GList *children;
GtkRequisition child_requisition;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PIZZA (widget));
g_return_if_fail (requisition != NULL);
pizza = GTK_PIZZA (widget);
children = pizza->children;
while (children)
{
child = children->data;
children = children->next;
if (GTK_WIDGET_VISIBLE (child->widget))
{
gtk_widget_size_request (child->widget, &child_requisition);
}
}
/* request very little, I'm not sure if requesting nothing
will always have positive effects on stability... */
requisition->width = 2;
requisition->height = 2;
}
示例10: gtk_pizza_draw
static void
gtk_pizza_draw (GtkWidget *widget,
GdkRectangle *area)
{
GtkPizza *pizza;
GtkPizzaChild *child;
GdkRectangle child_area;
GList *children;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PIZZA (widget));
pizza = GTK_PIZZA (widget);
/* Sometimes, We handle all expose events in window.cpp now. */
if (pizza->external_expose)
return;
children = pizza->children;
if ( !(GTK_WIDGET_APP_PAINTABLE (widget)) &&
(pizza->clear_on_draw))
{
gdk_window_clear_area( pizza->bin_window,
area->x, area->y, area->width, area->height);
}
while (children)
{
child = children->data;
children = children->next;
if (gtk_widget_intersect (child->widget, area, &child_area))
gtk_widget_draw (child->widget, &child_area);
}
}
示例11: wxInsertChildInFrame
static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
{
wxASSERT( GTK_IS_WIDGET(child->m_widget) );
if (!parent->m_insertInClientArea)
{
// These are outside the client area
wxFrame* frame = (wxFrame*) parent;
gtk_pizza_put( GTK_PIZZA(frame->m_mainWidget),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y,
child->m_width,
child->m_height );
#if wxUSE_TOOLBAR_NATIVE
// We connect to these events for recalculating the client area
// space when the toolbar is floating
if (wxIS_KIND_OF(child,wxToolBar))
{
wxToolBar *toolBar = (wxToolBar*) child;
if (toolBar->GetWindowStyle() & wxTB_DOCKABLE)
{
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_attached",
GTK_SIGNAL_FUNC(gtk_toolbar_attached_callback), (gpointer)parent );
gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_detached",
GTK_SIGNAL_FUNC(gtk_toolbar_detached_callback), (gpointer)parent );
}
}
#endif // wxUSE_TOOLBAR
}
else
{
// These are inside the client area
gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y,
child->m_width,
child->m_height );
}
// Resize on OnInternalIdle
parent->GtkUpdateSize();
}
示例12: gdk_window_invalidate_rect
void wxMiniFrame::SetTitle( const wxString &title )
{
wxFrame::SetTitle( title );
#ifdef __WXGTK20__
gdk_window_invalidate_rect( GTK_PIZZA(m_mainWidget)->bin_window, NULL, true );
#else
gtk_widget_draw( m_mainWidget, (GdkRectangle*) NULL );
#endif
}
示例13: gtk_pizza_add
static void
gtk_pizza_add (GtkContainer *container,
GtkWidget *widget)
{
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_PIZZA (container));
g_return_if_fail (widget != NULL);
gtk_pizza_put (GTK_PIZZA (container), widget, 0, 0, 20, 20 );
}
示例14: gtk_pizza_style_set
static void
gtk_pizza_style_set(GtkWidget *widget, GtkStyle *previous_style)
{
if (GTK_WIDGET_REALIZED(widget))
{
gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background(widget->style, GTK_PIZZA(widget)->bin_window, GTK_STATE_NORMAL );
}
(* GTK_WIDGET_CLASS (pizza_parent_class)->style_set) (widget, previous_style);
}
示例15: gtk_window_draw_callback
static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
{
GtkPizza *pizza = GTK_PIZZA(widget);
gtk_paint_flat_box (win->m_widget->style,
pizza->bin_window, GTK_STATE_NORMAL,
GTK_SHADOW_NONE,
rect,
win->m_widget,
(char *)"base",
0, 0, -1, -1);
}