Add MyTitleBar class for gtk160
This commit is contained in:
parent
624f56780f
commit
3af5f3f338
|
@ -26,7 +26,7 @@ link_directories (${GTK_LIBRARY_DIRS})
|
|||
# set(PO_DIR ${CMAKE_BINARY_DIR}/po/zh_CN/LC_MESSAGES)
|
||||
|
||||
#Source files
|
||||
set(SOURCE_FILE src/main.cpp src/MainWin.cpp src/TestWin.cpp)
|
||||
set(SOURCE_FILE src/main.cpp src/MainWin.cpp src/TestWin.cpp src/MyTitleBar.cpp)
|
||||
|
||||
#Compile Resource
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#include "MyTitleBar.h"
|
||||
|
||||
struct _MyTitleBar{
|
||||
GObject parent_instance;
|
||||
GtkWindow *ctrl_window;
|
||||
GtkWidget *header;
|
||||
GtkWidget *btn_close, *btn_mini;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(MyTitleBar, my_titlebar, G_TYPE_OBJECT)
|
||||
|
||||
static void my_titlebar_init(MyTitleBar *self)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void my_titlebar_class_init(MyTitleBarClass *klass)
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MyTitleBar, my_titlebar, My, TitleBar, GObject)
|
Loading…
Reference in New Issue