Documentation ¶
Index ¶
- Constants
- func IdentColor(scheme ColorScheme, ident string, self bool) tcell.Color
- func IsSplitRune(r rune) bool
- type BufferList
- func (bs *BufferList) Add(netID, netName, title string) (i int, added bool)
- func (bs *BufferList) AddLine(netID, title string, line Line)
- func (bs *BufferList) AddLines(netID, title string, before, after []Line)
- func (bs *BufferList) Buffer(i int) (netID, title string, ok bool)
- func (bs *BufferList) CloseOverlay()
- func (bs *BufferList) Current() (netID, title string)
- func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, width int, offset *int)
- func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int)
- func (bs *BufferList) DrawVerticalBufferList(screen tcell.Screen, x0, y0, width, height int, offset *int)
- func (bs *BufferList) GetLeftMost(screenWidth int) int
- func (bs *BufferList) HasOverlay() bool
- func (bs *BufferList) HorizontalBufferOffset(x int, offset int) int
- func (bs *BufferList) IsAtTop() bool
- func (bs *BufferList) Next()
- func (bs *BufferList) NextUnread()
- func (bs *BufferList) OpenOverlay()
- func (bs *BufferList) Previous()
- func (bs *BufferList) PreviousUnread()
- func (bs *BufferList) Remove(netID, title string) bool
- func (bs *BufferList) RemoveNetwork(netID string)
- func (bs *BufferList) ResizeTimeline(tlInnerWidth, tlHeight, textWidth int)
- func (bs *BufferList) ScrollDown(n int)
- func (bs *BufferList) ScrollDownHighlight() bool
- func (bs *BufferList) ScrollUp(n int)
- func (bs *BufferList) ScrollUpHighlight() bool
- func (bs *BufferList) SetRead(netID, title string, timestamp time.Time)
- func (bs *BufferList) SetTopic(netID, title string, topic string)
- func (bs *BufferList) ShowBufferNumbers(enabled bool)
- func (bs *BufferList) To(i int) bool
- func (bs *BufferList) UpdateRead() (netID, title string, timestamp time.Time)
- type ColorScheme
- type ColorSchemeType
- type Completion
- type Config
- type ConfigColors
- type Editor
- func (e *Editor) AutoComplete(offset int) (ok bool)
- func (e *Editor) BackSearch()
- func (e *Editor) Clear() bool
- func (e *Editor) Content() []rune
- func (e *Editor) Down()
- func (e *Editor) Draw(screen tcell.Screen, x0, y int)
- func (e *Editor) End()
- func (e *Editor) Flush() string
- func (e *Editor) Home()
- func (e *Editor) Left()
- func (e *Editor) LeftWord()
- func (e *Editor) PutRune(r rune)
- func (e *Editor) RemRune() (ok bool)
- func (e *Editor) RemRuneForward() (ok bool)
- func (e *Editor) RemWord() (ok bool)
- func (e *Editor) Resize(width int)
- func (e *Editor) Right()
- func (e *Editor) RightWord()
- func (e *Editor) Set(text string)
- func (e *Editor) TextLen() int
- func (e *Editor) Up()
- type Line
- type NotifyType
- type StyledString
- type StyledStringBuilder
- type UI
- func (ui *UI) AddBuffer(netID, netName, title string) (i int, added bool)
- func (ui *UI) AddLine(netID, buffer string, line Line)
- func (ui *UI) AddLines(netID, buffer string, before, after []Line)
- func (ui *UI) Beep()
- func (ui *UI) Buffer(i int) (netID, title string, ok bool)
- func (ui *UI) ChannelOffset() int
- func (ui *UI) ChannelWidth() int
- func (ui *UI) ClickBuffer(i int)
- func (ui *UI) ClickMember(i int)
- func (ui *UI) ClickedBuffer() int
- func (ui *UI) ClickedMember() int
- func (ui *UI) Close()
- func (ui *UI) CloseOverlay()
- func (ui *UI) CurrentBuffer() (netID, title string)
- func (ui *UI) Draw(members []irc.Member)
- func (ui *UI) Exit()
- func (ui *UI) GoToBufferNo(i int)
- func (ui *UI) HasOverlay() bool
- func (ui *UI) HorizontalBufferOffset(x int) int
- func (ui *UI) InputAutoComplete(offset int) (ok bool)
- func (ui *UI) InputBackSearch()
- func (ui *UI) InputBackspace() (ok bool)
- func (ui *UI) InputClear() bool
- func (ui *UI) InputContent() []rune
- func (ui *UI) InputDelete() (ok bool)
- func (ui *UI) InputDeleteWord() (ok bool)
- func (ui *UI) InputDown()
- func (ui *UI) InputEnd()
- func (ui *UI) InputFlush() (content string)
- func (ui *UI) InputHome()
- func (ui *UI) InputLeft()
- func (ui *UI) InputLeftWord()
- func (ui *UI) InputRight()
- func (ui *UI) InputRightWord()
- func (ui *UI) InputRune(r rune)
- func (ui *UI) InputSet(text string)
- func (ui *UI) InputUp()
- func (ui *UI) IsAtTop() bool
- func (ui *UI) JumpBuffer(sub string) bool
- func (ui *UI) JumpBufferIndex(i int) bool
- func (ui *UI) JumpBufferNetwork(netID, sub string) bool
- func (ui *UI) MemberOffset() int
- func (ui *UI) MemberWidth() int
- func (ui *UI) NextBuffer()
- func (ui *UI) NextUnreadBuffer()
- func (ui *UI) Notify(title string, body string)
- func (ui *UI) OpenOverlay()
- func (ui *UI) PreviousBuffer()
- func (ui *UI) PreviousUnreadBuffer()
- func (ui *UI) RemoveBuffer(netID, title string)
- func (ui *UI) RemoveNetworkBuffers(netID string)
- func (ui *UI) Resize()
- func (ui *UI) ScrollChannelDownBy(n int)
- func (ui *UI) ScrollChannelUpBy(n int)
- func (ui *UI) ScrollDown()
- func (ui *UI) ScrollDownBy(n int)
- func (ui *UI) ScrollDownHighlight() bool
- func (ui *UI) ScrollMemberDownBy(n int)
- func (ui *UI) ScrollMemberUpBy(n int)
- func (ui *UI) ScrollToBuffer()
- func (ui *UI) ScrollUp()
- func (ui *UI) ScrollUpBy(n int)
- func (ui *UI) ScrollUpHighlight() bool
- func (ui *UI) SetPrompt(prompt StyledString)
- func (ui *UI) SetRead(netID, buffer string, timestamp time.Time)
- func (ui *UI) SetStatus(status string)
- func (ui *UI) SetTitle(title string)
- func (ui *UI) SetTopic(netID, buffer string, topic string)
- func (ui *UI) ShouldExit() bool
- func (ui *UI) ShowBufferNumbers(enable bool)
- func (ui *UI) Size() (int, int)
- func (ui *UI) ToggleChannelList()
- func (ui *UI) ToggleMemberList()
- func (ui *UI) UpdateRead() (netID, buffer string, timestamp time.Time)
Constants ¶
View Source
const Overlay = "/overlay"
Variables ¶
This section is empty.
Functions ¶
func IdentColor ¶
func IdentColor(scheme ColorScheme, ident string, self bool) tcell.Color
func IsSplitRune ¶
Types ¶
type BufferList ¶
type BufferList struct {
// contains filtered or unexported fields
}
func NewBufferList ¶
func NewBufferList(colors ConfigColors, mergeLine func(*Line, Line)) BufferList
NewBufferList returns a new BufferList. Call Resize() once before using it.
func (*BufferList) Add ¶
func (bs *BufferList) Add(netID, netName, title string) (i int, added bool)
func (*BufferList) AddLine ¶
func (bs *BufferList) AddLine(netID, title string, line Line)
func (*BufferList) AddLines ¶
func (bs *BufferList) AddLines(netID, title string, before, after []Line)
func (*BufferList) Buffer ¶ added in v0.3.0
func (bs *BufferList) Buffer(i int) (netID, title string, ok bool)
func (*BufferList) CloseOverlay ¶
func (bs *BufferList) CloseOverlay()
func (*BufferList) Current ¶
func (bs *BufferList) Current() (netID, title string)
func (*BufferList) DrawHorizontalBufferList ¶
func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, width int, offset *int)
func (*BufferList) DrawTimeline ¶
func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int)
func (*BufferList) DrawVerticalBufferList ¶
func (bs *BufferList) DrawVerticalBufferList(screen tcell.Screen, x0, y0, width, height int, offset *int)
func (*BufferList) GetLeftMost ¶
func (bs *BufferList) GetLeftMost(screenWidth int) int
func (*BufferList) HasOverlay ¶
func (bs *BufferList) HasOverlay() bool
func (*BufferList) HorizontalBufferOffset ¶
func (bs *BufferList) HorizontalBufferOffset(x int, offset int) int
func (*BufferList) IsAtTop ¶
func (bs *BufferList) IsAtTop() bool
func (*BufferList) Next ¶
func (bs *BufferList) Next()
func (*BufferList) NextUnread ¶ added in v0.3.0
func (bs *BufferList) NextUnread()
func (*BufferList) OpenOverlay ¶
func (bs *BufferList) OpenOverlay()
func (*BufferList) Previous ¶
func (bs *BufferList) Previous()
func (*BufferList) PreviousUnread ¶ added in v0.3.0
func (bs *BufferList) PreviousUnread()
func (*BufferList) Remove ¶
func (bs *BufferList) Remove(netID, title string) bool
func (*BufferList) RemoveNetwork ¶
func (bs *BufferList) RemoveNetwork(netID string)
func (*BufferList) ResizeTimeline ¶
func (bs *BufferList) ResizeTimeline(tlInnerWidth, tlHeight, textWidth int)
func (*BufferList) ScrollDown ¶
func (bs *BufferList) ScrollDown(n int)
func (*BufferList) ScrollDownHighlight ¶
func (bs *BufferList) ScrollDownHighlight() bool
func (*BufferList) ScrollUp ¶
func (bs *BufferList) ScrollUp(n int)
func (*BufferList) ScrollUpHighlight ¶
func (bs *BufferList) ScrollUpHighlight() bool
func (*BufferList) SetRead ¶
func (bs *BufferList) SetRead(netID, title string, timestamp time.Time)
func (*BufferList) SetTopic ¶
func (bs *BufferList) SetTopic(netID, title string, topic string)
func (*BufferList) ShowBufferNumbers ¶
func (bs *BufferList) ShowBufferNumbers(enabled bool)
func (*BufferList) To ¶
func (bs *BufferList) To(i int) bool
func (*BufferList) UpdateRead ¶
func (bs *BufferList) UpdateRead() (netID, title string, timestamp time.Time)
type ColorScheme ¶ added in v0.2.0
type ColorScheme struct { Type ColorSchemeType Others tcell.Color Self tcell.Color }
type ColorSchemeType ¶ added in v0.3.0
type ColorSchemeType int
const ( ColorSchemeBase ColorSchemeType = iota ColorSchemeExtended ColorSchemeFixed )
type Completion ¶
type ConfigColors ¶
type ConfigColors struct { Status tcell.Color Prompt tcell.Color Unread tcell.Color Nicks ColorScheme }
type Editor ¶
type Editor struct {
// contains filtered or unexported fields
}
Editor is the text field where the user writes messages and commands.
func NewEditor ¶
func NewEditor(autoComplete func(cursorIdx int, text []rune) []Completion) Editor
NewEditor returns a new Editor. Call Resize() once before using it.
func (*Editor) AutoComplete ¶
func (*Editor) BackSearch ¶
func (e *Editor) BackSearch()
func (*Editor) RemRuneForward ¶
type Line ¶
type Line struct { At time.Time Head string Body StyledString HeadColor tcell.Color Notify NotifyType Highlight bool Readable bool Mergeable bool Data interface{} // contains filtered or unexported fields }
type NotifyType ¶
type NotifyType int
const ( NotifyNone NotifyType = iota NotifyUnread NotifyHighlight )
type StyledString ¶
type StyledString struct {
// contains filtered or unexported fields
}
func IRCString ¶
func IRCString(raw string) StyledString
func IdentString ¶
func IdentString(scheme ColorScheme, ident string, self bool) StyledString
func PlainSprintf ¶
func PlainSprintf(format string, a ...interface{}) StyledString
func PlainString ¶
func PlainString(s string) StyledString
func Styled ¶
func Styled(s string, style tcell.Style) StyledString
func (StyledString) ParseURLs ¶
func (s StyledString) ParseURLs() StyledString
func (StyledString) String ¶
func (s StyledString) String() string
func (StyledString) Truncate ¶
func (s StyledString) Truncate(w int, tail StyledString) StyledString
type StyledStringBuilder ¶
func (*StyledStringBuilder) AddStyle ¶
func (sb *StyledStringBuilder) AddStyle(start int, style tcell.Style)
func (*StyledStringBuilder) Reset ¶
func (sb *StyledStringBuilder) Reset()
func (*StyledStringBuilder) SetStyle ¶
func (sb *StyledStringBuilder) SetStyle(style tcell.Style)
func (*StyledStringBuilder) StyledString ¶
func (sb *StyledStringBuilder) StyledString() StyledString
func (*StyledStringBuilder) WriteStyledString ¶
func (sb *StyledStringBuilder) WriteStyledString(s StyledString)
type UI ¶
type UI struct { Events chan tcell.Event // contains filtered or unexported fields }
func (*UI) ChannelOffset ¶
func (*UI) ChannelWidth ¶
func (*UI) ClickBuffer ¶
func (*UI) ClickMember ¶
func (*UI) ClickedBuffer ¶
func (*UI) ClickedMember ¶
func (*UI) CloseOverlay ¶
func (ui *UI) CloseOverlay()
func (*UI) CurrentBuffer ¶
func (*UI) GoToBufferNo ¶
func (*UI) HasOverlay ¶
func (*UI) HorizontalBufferOffset ¶
func (*UI) InputAutoComplete ¶
func (*UI) InputBackSearch ¶
func (ui *UI) InputBackSearch()
func (*UI) InputBackspace ¶
func (*UI) InputClear ¶
func (*UI) InputContent ¶
InputContent result must not be modified.
func (*UI) InputDelete ¶
func (*UI) InputDeleteWord ¶
func (*UI) InputFlush ¶ added in v0.3.0
func (*UI) InputLeftWord ¶
func (ui *UI) InputLeftWord()
func (*UI) InputRight ¶
func (ui *UI) InputRight()
func (*UI) InputRightWord ¶
func (ui *UI) InputRightWord()
func (*UI) JumpBuffer ¶
func (*UI) JumpBufferIndex ¶
func (*UI) JumpBufferNetwork ¶
func (*UI) MemberOffset ¶
func (*UI) MemberWidth ¶
func (*UI) NextBuffer ¶
func (ui *UI) NextBuffer()
func (*UI) NextUnreadBuffer ¶ added in v0.3.0
func (ui *UI) NextUnreadBuffer()
func (*UI) OpenOverlay ¶
func (ui *UI) OpenOverlay()
func (*UI) PreviousBuffer ¶
func (ui *UI) PreviousBuffer()
func (*UI) PreviousUnreadBuffer ¶ added in v0.3.0
func (ui *UI) PreviousUnreadBuffer()
func (*UI) RemoveBuffer ¶
func (*UI) RemoveNetworkBuffers ¶
func (*UI) ScrollChannelDownBy ¶
func (*UI) ScrollChannelUpBy ¶
func (*UI) ScrollDown ¶
func (ui *UI) ScrollDown()
func (*UI) ScrollDownBy ¶
func (*UI) ScrollDownHighlight ¶
func (*UI) ScrollMemberDownBy ¶
func (*UI) ScrollMemberUpBy ¶
func (*UI) ScrollToBuffer ¶ added in v0.3.0
func (ui *UI) ScrollToBuffer()
func (*UI) ScrollUpBy ¶
func (*UI) ScrollUpHighlight ¶
func (*UI) SetPrompt ¶
func (ui *UI) SetPrompt(prompt StyledString)
func (*UI) ShouldExit ¶
func (*UI) ShowBufferNumbers ¶
func (*UI) ToggleChannelList ¶
func (ui *UI) ToggleChannelList()
func (*UI) ToggleMemberList ¶
func (ui *UI) ToggleMemberList()
Click to show internal directories.
Click to hide internal directories.