ptk-icon-view.c
来自「台湾人开发的Linux下的文件管理器」· C语言 代码 · 共 1,591 行 · 第 1/5 页
C
1,591 行
gtkwidget_class->expose_event = ptk_icon_view_expose_event; gtkwidget_class->key_press_event = ptk_icon_view_key_press; gtkwidget_class->key_release_event = ptk_icon_view_key_release; gtkwidget_class->motion_notify_event = ptk_icon_view_motion_notify_event; gtkwidget_class->button_press_event = ptk_icon_view_button_press_event; gtkwidget_class->button_release_event = ptk_icon_view_button_release_event; gtkwidget_class->drag_begin = ptk_icon_view_drag_begin; gtkwidget_class->drag_end = ptk_icon_view_drag_end; gtkwidget_class->drag_data_get = ptk_icon_view_drag_data_get; gtkwidget_class->drag_data_delete = ptk_icon_view_drag_data_delete; gtkwidget_class->drag_leave = ptk_icon_view_drag_leave; gtkwidget_class->drag_motion = ptk_icon_view_drag_motion; gtkwidget_class->drag_drop = ptk_icon_view_drag_drop; gtkwidget_class->drag_data_received = ptk_icon_view_drag_data_received; gtkwidget_class->get_accessible = ptk_icon_view_get_accessible; gtkcontainer_class = GTK_CONTAINER_CLASS ( klass ); gtkcontainer_class->remove = ptk_icon_view_remove; gtkcontainer_class->forall = ptk_icon_view_forall; klass->set_scroll_adjustments = ptk_icon_view_set_adjustments; klass->select_all = ptk_icon_view_real_select_all; klass->unselect_all = ptk_icon_view_real_unselect_all; klass->select_cursor_item = ptk_icon_view_real_select_cursor_item; klass->toggle_cursor_item = ptk_icon_view_real_toggle_cursor_item; klass->activate_cursor_item = ptk_icon_view_real_activate_cursor_item; klass->move_cursor = ptk_icon_view_real_move_cursor; /** * PtkIconView::column-spacing: * * The column-spacing property specifies the space which is inserted between * the columns of the icon view. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_COLUMN_SPACING, g_param_spec_int ( "column-spacing", _( "Column Spacing" ), _( "Space which is inserted between grid column" ), 0, G_MAXINT, 6, PTK_PARAM_READWRITE ) ); /** * PtkIconView::columns: * * The columns property contains the number of the columns in which the * items should be displayed. If it is -1, the number of columns will * be chosen automatically to fill the available area. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_COLUMNS, g_param_spec_int ( "columns", _( "Number of columns" ), _( "Number of columns to display" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); /** * PtkIconView::item-width: * * The item-width property specifies the width to use for each item. * If it is set to -1, the icon view will automatically determine a * suitable item size. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_ITEM_WIDTH, g_param_spec_int ( "item-width", _( "Width for each item" ), _( "The width used for each item" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); /** * PtkIconView::margin: * * The margin property specifies the space which is inserted * at the edges of the icon view. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_MARGIN, g_param_spec_int ( "margin", _( "Margin" ), _( "Space which is inserted at the edges of the icon view" ), 0, G_MAXINT, 6, PTK_PARAM_READWRITE ) ); /** * PtkIconView::markup-column: * * The ::markup-column property contains the number of the model column * containing markup information to be displayed. The markup column must be * of type #G_TYPE_STRING. If this property and the :text-column property * are both set to column numbers, it overrides the text column. * If both are set to -1, no texts are displayed. **/ g_object_class_install_property ( gobject_class, PROP_MARKUP_COLUMN, g_param_spec_int ( "markup-column", _( "Markup column" ), _( "Model column used to retrieve the text if using Pango markup" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); /** * PtkIconView::model: * * The ::model property contains the #GtkTreeModel, which should be * display by this icon view. Setting this property to %NULL turns * off the display of anything. **/ g_object_class_install_property ( gobject_class, PROP_MODEL, g_param_spec_object ( "model", _( "Icon View Model" ), _( "The model for the icon view" ), GTK_TYPE_TREE_MODEL, PTK_PARAM_READWRITE ) ); /** * PtkIconView::orientation: * * The orientation property specifies how the cells (i.e. the icon and * the text) of the item are positioned relative to each other. **/ g_object_class_install_property ( gobject_class, PROP_ORIENTATION, g_param_spec_enum ( "orientation", _( "Orientation" ), _( "How the text and icon of each item are positioned relative to each other" ), GTK_TYPE_ORIENTATION, GTK_ORIENTATION_VERTICAL, PTK_PARAM_READWRITE ) ); /** * PtkIconView::pixbuf-column: * * The ::pixbuf-column property contains the number of the model column * containing the pixbufs which are displayed. The pixbuf column must be * of type #GDK_TYPE_PIXBUF. Setting this property to -1 turns off the * display of pixbufs. **/ g_object_class_install_property ( gobject_class, PROP_PIXBUF_COLUMN, g_param_spec_int ( "pixbuf-column", _( "Pixbuf column" ), _( "Model column used to retrieve the icon pixbuf from" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); /** * PtkIconView::reorderable: * * The reorderable property specifies if the items can be reordered * by Drag and Drop. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_REORDERABLE, g_param_spec_boolean ( "reorderable", _( "Reorderable" ), _( "View is reorderable" ), FALSE, PTK_PARAM_READWRITE ) ); /** * PtkIconView::row-spacing: * * The row-spacing property specifies the space which is inserted between * the rows of the icon view. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_ROW_SPACING, g_param_spec_int ( "row-spacing", _( "Row Spacing" ), _( "Space which is inserted between grid rows" ), 0, G_MAXINT, 6, PTK_PARAM_READWRITE ) ); /** * PtkIconView::selection-mode: * * The ::selection-mode property specifies the selection mode of * icon view. If the mode is #GTK_SELECTION_MULTIPLE, rubberband selection * is enabled, for the other modes, only keyboard selection is possible. **/ g_object_class_install_property ( gobject_class, PROP_SELECTION_MODE, g_param_spec_enum ( "selection-mode", _( "Selection mode" ), _( "The selection mode" ), GTK_TYPE_SELECTION_MODE, GTK_SELECTION_SINGLE, PTK_PARAM_READWRITE ) ); /** * PtkIconView::spacing: * * The spacing property specifies the space which is inserted between * the cells (i.e. the icon and the text) of an item. * * Since: 0.3.1 **/ g_object_class_install_property ( gobject_class, PROP_SPACING, g_param_spec_int ( "spacing", _( "Spacing" ), _( "Space which is inserted between cells of an item" ), 0, G_MAXINT, 0, PTK_PARAM_READWRITE ) ); /** * PtkIconView::text-column: * * The ::text-column property contains the number of the model column * containing the texts which are displayed. The text column must be * of type #G_TYPE_STRING. If this property and the :markup-column * property are both set to -1, no texts are displayed. **/ g_object_class_install_property ( gobject_class, PROP_TEXT_COLUMN, g_param_spec_int ( "text-column", _( "Text column" ), _( "Model column used to retrieve the text from" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); g_object_class_install_property ( gobject_class, PROP_ENABLE_SEARCH, g_param_spec_boolean ( "enable-search", _( "Enable Search" ), _( "View allows user to search through columns interactively" ), TRUE, PTK_PARAM_READWRITE ) ); g_object_class_install_property ( gobject_class, PROP_SEARCH_COLUMN, g_param_spec_int ( "search-column", _( "Search Column" ), _( "Model column to search through when searching through code" ), -1, G_MAXINT, -1, PTK_PARAM_READWRITE ) ); /** * PtkIconView::selection-box-color: * Color of the selection box. **/ gtk_widget_class_install_style_property ( gtkwidget_class, g_param_spec_boxed ( "selection-box-color", _( "Selection Box Color" ), _( "Color of the selection box" ), GDK_TYPE_COLOR, PTK_PARAM_READABLE ) ); /** * PtkIconView::selection-box-alpha: * Opacity of the selection box. **/ gtk_widget_class_install_style_property ( gtkwidget_class, g_param_spec_uchar ( "selection-box-alpha", _( "Selection Box Alpha" ), _( "Opacity of the selection box" ), 0, 0xff, 0x40, PTK_PARAM_READABLE ) ); /** * PtkIconView::item-activated: * @icon_view : a #PtkIconView. * @path : **/ icon_view_signals[ ITEM_ACTIVATED ] = g_signal_new ( I_( "item-activated" ), G_TYPE_FROM_CLASS ( gobject_class ), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET ( PtkIconViewClass, item_activated ), NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, GTK_TYPE_TREE_PATH ); /** * PtkIconView::selection-changed: * @icon_view : a #PtkIconView. **/ icon_view_signals[ SELECTION_CHANGED ] = g_signal_new ( I_( "selection-changed" ), G_TYPE_FROM_CLASS ( gobject_class ), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET ( PtkIconViewClass, selection_changed ), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0 ); /** * PtkIconView::set-scroll-adjustments: * @icon_view : a #PtkIconView. * @hadjustment : * @vadjustment : **/ gtkwidget_class->set_scroll_adjustments_signal = g_signal_new ( I_( "set-scroll-adjustments" ), G_TYPE_FROM_CLASS ( gobject_class ), G_SIGNAL_RUN_LAST,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?