1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
/*
* Copyright 2017–2019 elementary, Inc. (https://elementary.io)
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
/**
* AbstractSettingsPage is a {@link Gtk.ScrolledWindow} subclass with properties used
* by other Granite settings widgets.
*/
public abstract class Granite.SettingsPage : Gtk.ScrolledWindow {
protected string _icon_name;
protected string _title;
/**
* Used to display a status icon overlayed on the display_widget in a Granite.SettingsSidebar
*/
public enum StatusType {
ERROR,
OFFLINE,
SUCCESS,
WARNING,
NONE
}
/**
* Selects a colored icon to be displayed in a Granite.SettingsSidebar
*/
public StatusType status_type { get; set; default = StatusType.NONE; }
/**
* A widget to display in place of an icon in a Granite.SettingsSidebar
*/
public Gtk.Widget? display_widget { get; construct; }
/**
* A header to be sorted under in a Granite.SettingsSidebar
*/
public string? header { get; construct; }
/**
* A status string to be displayed underneath the title in a Granite.SettingsSidebar
*/
public string status { get; set construct; }
/**
* An icon name to be displayed in a Granite.SettingsSidebar
*/
public string? icon_name {
get {
return _icon_name;
}
construct set {
_icon_name = value;
}
}
/**
* A title to be displayed in a Granite.SettingsSidebar
*/
public string title {
get {
return _title;
}
construct set {
_title = value;
}
}
construct {
hscrollbar_policy = Gtk.PolicyType.NEVER;
}
}
|