• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KHTML

DOM::Editor

DOM::Editor Class Reference

#include <editor.h>

Inheritance diagram for DOM::Editor:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class resembles the editing API when the associated khtml document is editable (in design mode), or contains editable elements.

FIXME: document this thoroughly

API to Wysiwyg Markup-Editor.

Author:
Leo Savernik

Definition at line 58 of file editor.h.


Public Types

enum  TriState { FalseTriState, TrueTriState, MixedTriState }

Public Member Functions

void appliedEditing (khtml::EditCommand &)
void applyStyle (DOM::CSSStyleDeclarationImpl *)
bool canPaste () const
bool canRedo () const
bool canUndo () const
void clearTypingStyle ()
void copy ()
void cut ()
bool execCommand (EditorCommand, bool userInterface, const DOMString &value)
bool execCommand (const DOMString &command, bool userInterface, const DOMString &value)
khtml::EditCommand lastEditCommand () const
void paste ()
void print ()
bool queryCommandEnabled (EditorCommand)
bool queryCommandEnabled (const DOMString &command)
bool queryCommandIndeterm (EditorCommand)
bool queryCommandIndeterm (const DOMString &command)
bool queryCommandState (EditorCommand)
bool queryCommandState (const DOMString &command)
bool queryCommandSupported (EditorCommand)
bool queryCommandSupported (const DOMString &command)
DOMString queryCommandValue (EditorCommand)
DOMString queryCommandValue (const DOMString &command)
void reappliedEditing (khtml::EditCommand &)
void redo ()
DOM::CSSStyleDeclarationImpl * selectionComputedStyle (DOM::NodeImpl *&nodeToRemove) const
TriState selectionHasStyle (DOM::CSSStyleDeclarationImpl *) const
bool selectionStartHasStyle (DOM::CSSStyleDeclarationImpl *) const
DOM::DOMString selectionStartStylePropertyValue (int stylePropertyID) const
void setTypingStyle (DOM::CSSStyleDeclarationImpl *)
DOM::CSSStyleDeclarationImpl * typingStyle () const
void unappliedEditing (khtml::EditCommand &)
void undo ()

Member Enumeration Documentation

enum DOM::Editor::TriState

Tri-state boolean.

Enumerator:
FalseTriState 
TrueTriState 
MixedTriState 

Definition at line 68 of file editor.h.


Member Function Documentation

void Editor::appliedEditing ( khtml::EditCommand &  cmd  ) 

Called when editing has been applied.

Definition at line 398 of file editor.cpp.

void DOM::Editor::applyStyle ( DOM::CSSStyleDeclarationImpl *   ) 

applies the given style to the current selection

bool Editor::canPaste (  )  const

returns whether clipboard contains data to be pasted

Definition at line 195 of file editor.cpp.

bool Editor::canRedo (  )  const

returns whether any actions can be redone

Definition at line 217 of file editor.cpp.

bool Editor::canUndo (  )  const

returns whether any actions can be undone

Definition at line 222 of file editor.cpp.

void Editor::clearTypingStyle (  ) 

Clears the typing style for the document.

Definition at line 459 of file editor.cpp.

void Editor::copy (  ) 

copy selection to clipboard

Definition at line 172 of file editor.cpp.

void Editor::cut (  ) 

cut selection and insert into clipboard

Definition at line 177 of file editor.cpp.

bool Editor::execCommand ( EditorCommand  command,
bool  userInterface,
const DOMString &  value 
)

Executes the given built-in editor command.

Parameters:
EditorCommand index of command
userInterface whether an user interface should be used to input data. This is command dependant.
value value for command. Its semantic depends on the command.

Definition at line 136 of file editor.cpp.

bool Editor::execCommand ( const DOMString &  command,
bool  userInterface,
const DOMString &  value 
)

Executes the given editor command.

Parameters:
command name of command
userInterface whether an user interface should be used to input data. This is command dependant.
value value for command. Its semantic depends on the command.

Definition at line 100 of file editor.cpp.

EditCommand Editor::lastEditCommand (  )  const

Returns the most recent edit command applied.

Definition at line 393 of file editor.cpp.

void Editor::paste (  ) 

paste into current selection from clipboard

Definition at line 183 of file editor.cpp.

void Editor::print (  ) 

prints the current document

Definition at line 190 of file editor.cpp.

bool Editor::queryCommandEnabled ( EditorCommand  command  ) 

Checks whether the given command is enabled.

Definition at line 142 of file editor.cpp.

bool Editor::queryCommandEnabled ( const DOMString &  command  ) 

Checks whether the given command is enabled.

Definition at line 106 of file editor.cpp.

bool Editor::queryCommandIndeterm ( EditorCommand  command  ) 

Checks whether the given command's style is indeterminate.

Definition at line 148 of file editor.cpp.

bool Editor::queryCommandIndeterm ( const DOMString &  command  ) 

Checks whether the given command's style is indeterminate.

Definition at line 112 of file editor.cpp.

bool Editor::queryCommandState ( EditorCommand  command  ) 

Checks whether the given command's style is state.

Definition at line 154 of file editor.cpp.

bool Editor::queryCommandState ( const DOMString &  command  ) 

Checks whether the given command's style is state.

Definition at line 118 of file editor.cpp.

bool Editor::queryCommandSupported ( EditorCommand  command  ) 

Checks whether the given command is supported in the current context.

Definition at line 160 of file editor.cpp.

bool Editor::queryCommandSupported ( const DOMString &  command  ) 

Checks whether the given command is supported in the current context.

Definition at line 124 of file editor.cpp.

DOMString Editor::queryCommandValue ( EditorCommand  command  ) 

Returns the given command's value.

Definition at line 166 of file editor.cpp.

DOMString Editor::queryCommandValue ( const DOMString &  command  ) 

Returns the given command's value.

Definition at line 130 of file editor.cpp.

void Editor::reappliedEditing ( khtml::EditCommand &  cmd  ) 

Called when editing has been reapplied.

Definition at line 430 of file editor.cpp.

void Editor::redo (  ) 

redo last undone action

Definition at line 201 of file editor.cpp.

DOM::CSSStyleDeclarationImpl* DOM::Editor::selectionComputedStyle ( DOM::NodeImpl *&  nodeToRemove  )  const

computed style of current selection

TriState DOM::Editor::selectionHasStyle ( DOM::CSSStyleDeclarationImpl *   )  const

returns whether the selection has got applied the given style

bool DOM::Editor::selectionStartHasStyle ( DOM::CSSStyleDeclarationImpl *   )  const

returns whether the selection has got applied the given style

DOMString Editor::selectionStartStylePropertyValue ( int  stylePropertyID  )  const

?

Definition at line 335 of file editor.cpp.

void DOM::Editor::setTypingStyle ( DOM::CSSStyleDeclarationImpl *   ) 

Sets the typing style for the document.

CSSStyleDeclarationImpl * Editor::typingStyle (  )  const

Returns the typing style for the document.

Definition at line 444 of file editor.cpp.

void Editor::unappliedEditing ( khtml::EditCommand &  cmd  ) 

Called when editing has been unapplied.

Definition at line 416 of file editor.cpp.

void Editor::undo (  ) 

undo last action

Definition at line 209 of file editor.cpp.


The documentation for this class was generated from the following files:
  • editor.h
  • editor.cpp

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal