• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GTK_PIZZA函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_PIZZA函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_PIZZA函数的具体用法?C++ GTK_PIZZA怎么用?C++ GTK_PIZZA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_PIZZA函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 );
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:7,代码来源:minifram.cpp


示例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();
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:29,代码来源:toplevel.cpp


示例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);
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:52,代码来源:statusbr.cpp


示例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 );
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:15,代码来源:scrolwin.cpp


示例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);
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:30,代码来源:win_gtk.c


示例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);
    }
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:25,代码来源:win_gtk.c


示例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
    }
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:33,代码来源:frame.cpp


示例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
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:33,代码来源:statusbr.cpp


示例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;
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:32,代码来源:win_gtk.c


示例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);
    }
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:35,代码来源:win_gtk.c


示例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();
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:46,代码来源:frame.cpp


示例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
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:10,代码来源:minifram.cpp


示例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 );
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:10,代码来源:win_gtk.c


示例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);
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:11,代码来源:win_gtk.c


示例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);
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:12,代码来源:toplevel.cpp


示例16: wxCHECK_MSG

bool wxTopLevelWindowGTK::SetShape(const wxRegion& region)
{
    wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), false,
                 wxT("Shaped windows must be created with the wxFRAME_SHAPED style."));

    GdkWindow *window = NULL;
    if (m_wxwindow)
    {
        window = GTK_PIZZA(m_wxwindow)->bin_window;
        do_shape_combine_region(window, region);
    }
    window = m_widget->window;
    return do_shape_combine_region(window, region);
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:14,代码来源:toplevel.cpp


示例17: gtk_window_expose_callback

static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win )
{
    GtkPizza *pizza = GTK_PIZZA(widget);

    gtk_paint_flat_box (win->m_widget->style,
                        pizza->bin_window, GTK_STATE_NORMAL,
                        GTK_SHADOW_NONE,
                        &gdk_event->area,
                        win->m_widget,
                        (char *)"base",
                        0, 0, -1, -1);

    return FALSE;
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:14,代码来源:toplevel.cpp


示例18: gtk_window_own_expose_callback

static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxMiniFrame *win )
{
    // don't need to install idle handler, its done from "event" signal

    if (!win->m_hasVMT) return;
    if (gdk_event->count > 0) return;

    GtkPizza *pizza = GTK_PIZZA(widget);

    gtk_paint_shadow (widget->style,
                      pizza->bin_window,
                      GTK_STATE_NORMAL,
                      GTK_SHADOW_OUT,
                      NULL, NULL, NULL, // FIXME: No clipping?
                      0, 0,
                      win->m_width, win->m_height);

    int style = win->GetWindowStyle();

    wxClientDC dc(win);
    // Hack alert
    dc.m_window = pizza->bin_window;

    if (style & wxRESIZE_BORDER)
    {
        dc.SetBrush( *wxGREY_BRUSH );
        dc.SetPen( *wxTRANSPARENT_PEN );
        dc.DrawRectangle( win->m_width - 14, win->m_height-14, 14, 14 );
    }

    if (!win->GetTitle().empty() &&
        ((style & wxCAPTION) ||
         (style & wxTINY_CAPTION_HORIZ) ||
         (style & wxTINY_CAPTION_VERT)))
    {
        dc.SetFont( *wxSMALL_FONT );
        int height = dc.GetCharHeight();

        wxBrush brush( LightContrastColour( wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT) ) );
        dc.SetBrush( brush );
        dc.SetPen( *wxTRANSPARENT_PEN );
        dc.DrawRectangle( 3, 3, win->m_width - 7, height );

        dc.SetTextForeground( *wxWHITE );
        dc.DrawText( win->GetTitle(), 6, 3 );

        if (style & wxCLOSE_BOX)
            dc.DrawBitmap( win->m_closeButton, win->m_width-19, 2, true );
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:50,代码来源:minifram.cpp


示例19: GTK_PIZZA

void wxGLContext::SetCurrent(const wxGLCanvas& win) const
{
    if (m_glContext)
    {
        GdkWindow *window = GTK_PIZZA(win.m_wxwindow)->bin_window;
        if (window == NULL)
            return;

        if (wxGLCanvas::GetGLXVersion() >= 13)
            // GLX >= 1.3
            glXMakeContextCurrent( GDK_DISPLAY(), GDK_WINDOW_XWINDOW(window), GDK_WINDOW_XWINDOW(window), m_glContext );
        else
            // GLX <= 1.2
            glXMakeCurrent( GDK_DISPLAY(), GDK_WINDOW_XWINDOW(window), m_glContext );
    }
}
开发者ID:SCP-682,项目名称:Cities3D,代码行数:16,代码来源:glcanvas.cpp


示例20: wxInsertChildInDialog

static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
{
    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 );

    if (parent->HasFlag(wxTAB_TRAVERSAL))
    {
        /* we now allow a window to get the focus as long as it
           doesn't have any children. */
        GTK_WIDGET_UNSET_FLAGS( parent->m_wxwindow, GTK_CAN_FOCUS );
    }
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:16,代码来源:popupwin.cpp



注:本文中的GTK_PIZZA函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_PLUG函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_PANED函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap