teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Classes | Public Member Functions | Static Public Member Functions | List of all members
teditor::readonly::ReadOnlyMode Class Reference

#include <readonly.h>

+ Inheritance diagram for teditor::readonly::ReadOnlyMode:

Public Member Functions

 ReadOnlyMode (const std::string &n="ro", const std::string &w="abcdefghijklmnopqrstuvwxyzABCDEGGHIJKLMNO" "PQRSTUVWXYZ0123456789_")
 
int indent (Buffer &buf, int line)
 
KeyCmdMapgetKeyCmdMap ()
 
ColorMapgetColorMap ()
 
void getColorFor (AttrColor &fg, AttrColor &bg, int lineNum, int pos, const Buffer &b, bool isHighlighted)
 
- Public Member Functions inherited from teditor::Mode
 Mode (const std::string &n, const std::string &w)
 ctor More...
 
virtual ~Mode ()
 
virtual const std::string & name () const
 
virtual const std::string & word () const
 
virtual Strings cmdNames () const
 

Static Public Member Functions

static Modecreate ()
 
static bool modeCheck (const std::string &file)
 
- Static Public Member Functions inherited from teditor::Mode
static ModePtr createMode (const std::string &mode)
 Helper to create mode object of the named mode. More...
 
static std::string inferMode (const std::string &file, bool isDir)
 Helper to infer mode name from the file. More...
 

Detailed Description

default mode for all readonly buffers

Constructor & Destructor Documentation

◆ ReadOnlyMode()

teditor::readonly::ReadOnlyMode::ReadOnlyMode ( const std::string &  n = "ro",
const std::string &  w = "abcdefghijklmnopqrstuvwxyzABCDEGGHIJKLMNO" "PQRSTUVWXYZ0123456789_" 
)

Member Function Documentation

◆ create()

static Mode* teditor::readonly::ReadOnlyMode::create ( )
inlinestatic

◆ getColorFor()

void teditor::readonly::ReadOnlyMode::getColorFor ( AttrColor fg,
AttrColor bg,
int  lineNum,
int  pos,
const Buffer b,
bool  isHighlighted 
)
virtual

get color for the given line

Implements teditor::Mode.

Reimplemented in teditor::dir::DirMode, and teditor::grep::GrepMode.

◆ getColorMap()

ColorMap& teditor::readonly::ReadOnlyMode::getColorMap ( )
inlinevirtual

get color map for the buffer this mode applies to

Implements teditor::Mode.

◆ getKeyCmdMap()

KeyCmdMap& teditor::readonly::ReadOnlyMode::getKeyCmdMap ( )
inlinevirtual

get key-cmd map for the buffer this mode applies to

Implements teditor::Mode.

◆ indent()

int teditor::readonly::ReadOnlyMode::indent ( Buffer buf,
int  line 
)
inlinevirtual

function to compute indentation of the line in the input buffer

Implements teditor::Mode.

Reimplemented in teditor::text::TextMode, and teditor::cpp::CppMode.

◆ modeCheck()

bool teditor::readonly::ReadOnlyMode::modeCheck ( const std::string &  file)
static

The documentation for this class was generated from the following files: