framework

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2023 License: GPL-3.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto added in v1.2.5

type Crypto struct {
}

func (Crypto) Decrypt added in v1.2.5

func (c Crypto) Decrypt(encryptedString string) (string, error)

Decrypt : Decrypts an encrypted string

func (Crypto) Encrypt added in v1.2.5

func (c Crypto) Encrypt(plainText string) (string, error)

Encrypt : Encrypts a string

type Dialog added in v1.2.9

type Dialog struct {
	// contains filtered or unexported fields
}

Dialog contains information about the dialog the user wants

func (*Dialog) ErrorIcon added in v1.2.9

func (d *Dialog) ErrorIcon() *Dialog

ErrorIcon adds an error icon to the dialog

func (*Dialog) Extra added in v1.2.9

func (d *Dialog) Extra(extra string) *Dialog

Extra sets the extra text that will be displayed in a scrollable text box.

func (*Dialog) Height added in v1.2.9

func (d *Dialog) Height(height int) *Dialog

Height sets the minimum height of the dialog.

func (*Dialog) InfoIcon added in v1.2.9

func (d *Dialog) InfoIcon() *Dialog

InfoIcon adds an information icon to the dialog

func (*Dialog) OkButton added in v1.2.9

func (d *Dialog) OkButton() *Dialog

OkButton adds an ok button to the dialog

func (*Dialog) OkCancelButtons added in v1.2.9

func (d *Dialog) OkCancelButtons() *Dialog

OkCancelButtons adds an ok button and a cancel button to the dialog

func (*Dialog) QuestionIcon added in v1.2.9

func (d *Dialog) QuestionIcon() *Dialog

QuestionIcon adds a question icon to the dialog

func (*Dialog) Show added in v1.2.9

func (d *Dialog) Show() gtk.ResponseType

Show will display the dialog

func (*Dialog) Size added in v1.2.9

func (d *Dialog) Size(width, height int) *Dialog

Size sets the minimum size of the dialog.

func (*Dialog) Text added in v1.2.9

func (d *Dialog) Text(text string) *Dialog

Text sets the main text in the dialog.

func (*Dialog) TextMarkup added in v1.2.9

func (d *Dialog) TextMarkup(textMarkup string) *Dialog

TextMarkup sets the main text in the dialog in the GTK markup format.

func (*Dialog) WarningIcon added in v1.2.9

func (d *Dialog) WarningIcon() *Dialog

WarningIcon adds a warning icon to the dialog

func (*Dialog) Width added in v1.2.9

func (d *Dialog) Width(width int) *Dialog

Width sets the minimum width of the dialog.

func (*Dialog) YesNoButtons added in v1.2.9

func (d *Dialog) YesNoButtons() *Dialog

YesNoButtons adds a yes button and no cancel button to the dialog

func (*Dialog) YesNoCancelButtons added in v1.2.9

func (d *Dialog) YesNoCancelButtons() *Dialog

YesNoCancelButtons adds a yes button, a no button, and a cancel button to the dialog

type Error added in v1.2.3

type Error struct {
}

func (*Error) CheckWithPanic added in v1.2.3

func (e *Error) CheckWithPanic(err error, message string)

CheckWithPanic : panics on error

func (*Error) CheckWithoutPanic added in v1.2.3

func (e *Error) CheckWithoutPanic(err error, message string) bool

CheckWithoutPanic : panics on error

type Framework added in v1.2.0

type Framework struct {
	Gtk      *Gtk
	IO       *IO
	Process  *Process
	Resource *Resource
	Slice    *Slice
	Error    *Error
	Crypto   *Crypto
	Mail     *MailSender
	Log      *Log
}

func NewFramework added in v1.2.0

func NewFramework() *Framework

type Gtk added in v1.2.3

type Gtk struct {
}

func (*Gtk) ClearFlowBox added in v1.2.3

func (g *Gtk) ClearFlowBox(list *gtk.FlowBox)

ClearFlowBox : Clears a gtk.FlowBox

func (*Gtk) ClearListBox added in v1.2.3

func (g *Gtk) ClearListBox(list *gtk.ListBox)

ClearListBox : Clears a gtk.ListBox

func (*Gtk) CreateBuilder added in v1.2.3

func (g *Gtk) CreateBuilder(fileNameOrPath string) (*GtkBuilder, error)

CreateBuilder : Creates the actual gtk.Builder

func (*Gtk) Title added in v1.2.9

func (g *Gtk) Title(title string) *Dialog

Title is the starting method, since every dialog needs a title.

type GtkBuilder added in v1.2.2

type GtkBuilder struct {
	Builder *gtk.Builder
}

func (*GtkBuilder) GetObject added in v1.2.2

func (g *GtkBuilder) GetObject(name string) glib.IObject

GetObject : Gets a gtk object by name

type IO

type IO struct {
}

func (*IO) DirectoryExists

func (i *IO) DirectoryExists(path string) bool

DirectoryExists : Checks if the specified directory exists

func (*IO) FileExists

func (i *IO) FileExists(path string) bool

FileExists : Checks if the specified file exists

func (*IO) ReadAllText

func (i *IO) ReadAllText(path string) (string, error)

ReadAllText : Reads a text file and returns the content

type Log added in v1.3.0

type Log struct {
}

func (*Log) NewStandardLogger added in v1.3.0

func (l *Log) NewStandardLogger(path string) (*Logger, error)

type Logger added in v1.3.0

type Logger struct {
	Path    string
	Trace   *log.Logger
	Info    *log.Logger
	Warning *log.Logger
	Error   *log.Logger
	// contains filtered or unexported fields
}

func (*Logger) Close added in v1.3.1

func (l *Logger) Close()

type MailMessage added in v1.2.5

type MailMessage struct {
	From    string
	To      string
	Subject string
	Body    string
}

type MailSender added in v1.2.5

type MailSender struct {
}

func (*MailSender) SendMail added in v1.2.5

func (m *MailSender) SendMail(mailMessage MailMessage) error

type Process added in v1.1.0

type Process struct {
}

func (*Process) Open added in v1.1.0

func (p *Process) Open(command string, args ...string) string

Open : Opens a command with the specified arguments

func (*Process) OpenInGoland added in v1.1.0

func (p *Process) OpenInGoland(path string)

OpenInGoland : Opens the specified folder in Goland

func (*Process) OpenInNemo added in v1.1.0

func (p *Process) OpenInNemo(path string)

OpenInNemo : Opens a new nemo instance with the specified folder opened

func (*Process) OpenInTerminal added in v1.1.0

func (p *Process) OpenInTerminal(path string)

OpenInTerminal : Opens a new terminal with path as its current directory

type Resource added in v1.1.0

type Resource struct {
}

Resource : Handles SoftTeam resources

func (*Resource) GetExecutableFile added in v1.1.0

func (r *Resource) GetExecutableFile() string

GetExecutableFile : Returns the path of the executable file

func (*Resource) GetExecutablePath added in v1.1.0

func (r *Resource) GetExecutablePath() string

GetExecutablePath : Returns the directory of the executable file

func (*Resource) GetResourcePath added in v1.1.0

func (r *Resource) GetResourcePath(fileName string) string

GetResourcePath : Gets the path for a single resource file

func (*Resource) GetResourcesPath added in v1.1.0

func (r *Resource) GetResourcesPath() string

GetResourcesPath : Returns the resources path

func (*Resource) GetUserHomeDirectory added in v1.1.0

func (r *Resource) GetUserHomeDirectory() string

type Slice added in v1.1.0

type Slice struct {
}

func (*Slice) ContainsInt added in v1.1.0

func (s *Slice) ContainsInt(slice []int, find int) bool

ContainsInt : Returns true if the slice contains the integer

in find, otherwise returns false.

func (*Slice) ContainsString added in v1.1.0

func (s *Slice) ContainsString(slice []string, find string) bool

ContainsString : Returns true if the slice contains the string

in find, otherwise returns false.

func (*Slice) IndexOfInt added in v1.2.7

func (s *Slice) IndexOfInt(slice []int, find int) int

IndexOfInt : Returns the index if the slice contains the integer

in find, otherwise returns -1.

func (*Slice) IndexOfString added in v1.2.7

func (s *Slice) IndexOfString(slice []string, find string) int

IndexOfString : Returns index if the slice contains the string

in find, otherwise returns -1.

func (*Slice) RemoveIntAt added in v1.1.0

func (s *Slice) RemoveIntAt(slice []int, index int) []int

RemoveIntAt : Removes the integer at the specified index

from the slice

func (*Slice) RemoveIntAtFast added in v1.1.0

func (s *Slice) RemoveIntAtFast(slice []int, index int) []int

RemoveIntAtFast : Removes the integer at the specified index

from the slice. IMPORTANT : This function
reorders the items in the slice!

func (*Slice) RemoveStringAt added in v1.1.0

func (s *Slice) RemoveStringAt(slice []string, index int) []string

RemoveStringAt : Removes the string at the specified index

from the slice

func (*Slice) RemoveStringAtFast added in v1.1.0

func (s *Slice) RemoveStringAtFast(slice []string, index int) []string

RemoveStringAtFast : Removes the string at the specified index

from the slice. IMPORTANT : This function
reorders the items in the slice!

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL