postview

package
v0.0.0-...-94bc88a Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	*adaptive.LoadablePage
	// contains filtered or unexported fields
}

Comment describes a single comment. A comment can contain more comments.

func NewComment

func NewComment() *Comment

NewComment creates a new Comment.

func (*Comment) Append

func (c *Comment) Append(comment *Comment)

Append adds the given comment as the comment's children.

func (*Comment) SetError

func (c *Comment) SetError(err error)

SetError marks the comment as erroneous and shows the error to the user.

func (*Comment) SetItem

func (c *Comment) SetItem(item *hackernews.Item)

SetItem sets the fetched item and displays it.

type CommentAppender

type CommentAppender interface {
	Append(*Comment)
}

CommentAppender describes any widget that we can add comments to. It is implemented by View and Comment.

type View

type View struct {
	*gtk.ScrolledWindow
	// contains filtered or unexported fields
}

View describes a view of a single post with all its comments.

func NewView

func NewView(item *hackernews.Item) *View

NewView creates a new View.

func (*View) Append

func (v *View) Append(comment *Comment)

Append adds a comment to the toplevel.

Jump to

Keyboard shortcuts

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