Example #1
0
void
nsHTMLStyleElement::ContentAppended(nsIDocument* aDocument,
                                    nsIContent* aContainer,
                                    PRInt32 aNewIndexInContainer)
{
  ContentChanged(aContainer);
}
void
SVGStyleElement::CharacterDataChanged(nsIDocument* aDocument,
                                      nsIContent* aContent,
                                      CharacterDataChangeInfo* aInfo)
{
  ContentChanged(aContent);
}
Example #3
0
GLSLTextEditor::GLSLTextEditor(QWidget* parent)
  : QPlainTextEdit (parent)
{
  _highlighter = new GLSLSyntaxHighlighter(document());

  _lineNumberArea = new LineNumberArea (this);
  connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(UpdateLineNumberAreaWidth(int)));
  connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(UpdateLineNumberArea(QRect,int)));
  connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(HighlightCurrentLine()));


  setWordWrapMode(QTextOption::NoWrap);
  QTextDocument* doc = document();
#ifdef _WIN32
  QFont f ("Courier");
#else
  QFont f ("Monospace");
#endif
  f.setStyleHint(QFont::Monospace);
	f.setPixelSize(11);
  doc->setDefaultFont(f);


  connect (doc, SIGNAL(contentsChange(int,int,int)), SLOT(on_document_contentChanged (int, int, int)));

  connect(doc, SIGNAL(contentsChanged()), this, SIGNAL(ContentChanged()));
}
void
HTMLTextAreaElement::CharacterDataChanged(nsIDocument* aDocument,
                                          nsIContent* aContent,
                                          CharacterDataChangeInfo* aInfo)
{
  ContentChanged(aContent);
}
Example #5
0
void
nsHTMLStyleElement::ContentRemoved(nsIDocument* aDocument,
                                   nsIContent* aContainer,
                                   nsIContent* aChild,
                                   PRInt32 aIndexInContainer)
{
  ContentChanged(aChild);
}
void
nsHTMLTextAreaElement::ContentInserted(nsIDocument* aDocument,
                                       nsIContent* aContainer,
                                       nsIContent* aChild,
                                       PRInt32 aIndexInContainer)
{
  ContentChanged(aChild);
}
void
SVGStyleElement::ContentAppended(nsIDocument* aDocument,
                                 nsIContent* aContainer,
                                 nsIContent* aFirstNewContent,
                                 int32_t aNewIndexInContainer)
{
  ContentChanged(aContainer);
}
void
HTMLTextAreaElement::ContentAppended(nsIDocument* aDocument,
                                     nsIContent* aContainer,
                                     nsIContent* aFirstNewContent,
                                     int32_t /* unused */)
{
  ContentChanged(aFirstNewContent);
}
void
SVGStyleElement::ContentInserted(nsIDocument* aDocument,
                                 nsIContent* aContainer,
                                 nsIContent* aChild,
                                 int32_t aIndexInContainer)
{
  ContentChanged(aChild);
}
void
HTMLTextAreaElement::ContentInserted(nsIDocument* aDocument,
                                     nsIContent* aContainer,
                                     nsIContent* aChild,
                                     int32_t /* unused */)
{
  ContentChanged(aChild);
}
void
HTMLTextAreaElement::ContentRemoved(nsIDocument* aDocument,
                                    nsIContent* aContainer,
                                    nsIContent* aChild,
                                    int32_t aIndexInContainer,
                                    nsIContent* aPreviousSibling)
{
  ContentChanged(aChild);
}
Example #12
0
bool HexView::Redo()
{
	if(m_pDataSeq->redo())
	{
		m_nSelectionStart = m_pDataSeq->event_index();
		m_nSelectionEnd   = m_pDataSeq->event_length() + m_nSelectionStart;
		m_nCursorOffset   = m_nSelectionEnd;

		ContentChanged();
		return true;
	}
	else
	{
		return false;
	}
}
Example #13
0
bool HexView::ForwardDelete()
{
	if(SelectionSize() > 0)
	{
		m_pDataSeq->erase(SelectionStart(), SelectionSize());
		m_nCursorOffset = SelectionStart();

		m_pDataSeq->breakopt();
	}
	else
	{
		m_pDataSeq->erase(m_nCursorOffset, 1);
	}

	m_nSelectionStart = m_nCursorOffset;
	m_nSelectionEnd   = m_nCursorOffset;

	ContentChanged();

	return true;
}
void HTMLTextAreaElement::ContentAppended(nsIContent* aFirstNewContent) {
  ContentChanged(aFirstNewContent);
}
void HTMLTextAreaElement::ContentInserted(nsIContent* aChild) {
  ContentChanged(aChild);
}
Example #16
0
void SVGStyleElement::ContentRemoved(nsIContent* aChild,
                                     nsIContent* aPreviousSibling) {
  ContentChanged(aChild);
}
Example #17
0
LRESULT HexView::OnChar(UINT nChar)
{
	if(nChar < 32)
		return 0;

	if(m_nEditMode == HVMODE_READONLY)
	{
		MessageBeep(MB_ICONASTERISK);
		return 0;
	}
		
	if(m_nWhichPane == 0)	// hex column
	{
		int  cl[4] = { 2, 3, 3, 8 };
		int  cb[4] = { 16, 10, 8, 2 };
		//int  cw[4] = { 2, 3, 3, 2 };
		int  cf = m_nControlStyles & HVS_FORMAT_MASK;
		int  val;
		BYTE b = 0;

		// get data under caret
		if(m_nSubItem > 0)
		{
			b = m_pDataSeq->getlastmodref();
		}
		else
		{
			GetData(m_nCursorOffset, &b, 1);
		}

		// check this is an allowed character
		if(cf == HVS_FORMAT_HEX && !isxdigit(nChar) ||
		   cf == HVS_FORMAT_DEC && !(nChar >= '0' && nChar <= '9')  ||
		   cf == HVS_FORMAT_OCT && !(nChar >= '0' && nChar <= '7')  ||
		   cf == HVS_FORMAT_BIN && !(nChar >= '0' && nChar <= '1')
		   )
		{
			MessageBeep(MB_ICONASTERISK);
			return 0;
		}

		int val2;
		if(nChar >= 'a')		val2 = nChar - 'a' + 0x0a;
		else if(nChar >= 'A')	val2 = nChar - 'A' + 0x0A;
		else					val2 = nChar - '0';

		int power = 1;
		int base  = cb[cf];
		for(int i = cl[cf] - 1; i > m_nSubItem; i--)
			power *= base;

		if(m_nEditMode == HVMODE_INSERT)
			b = 0;

		val = b;
		val = (val / power) % base;
		val *= power;
		val = b - val;
		val += val2 * power;

		// check that we won't overflow the underlying value
		if(val > 0xff)
		{
			//MessageBeep(MB_ICONASTERISK);
			//return 0;
			val -= b % power;
		}


		if(m_nSubItem++ == 0)
		{	
			b = (BYTE)val;

			// enter the data
			EnterData(&b, 1, m_nWhichPane == 0 ? false : true, true, false);
		}
		else
		{
			// directly edit the byte in the sequence - this
			// prevents us from introducing any more spans than necessary
			// and keeps this as a single 'byte' edit
			m_pDataSeq->getlastmodref() = val;
			ContentChanged();

			if(m_nSubItem == cl[cf])
			{
				m_nSubItem = 0;
				m_nCursorOffset++;
			}
			
			RepositionCaret();
		}
	}
	else
	{
		BYTE b = nChar;

		// ascii column - enter the data as-is
		m_nSubItem = 0;
		EnterData(&b, 1, true, true, false);
	}

	return 0;
}
Example #18
0
void SVGStyleElement::ContentAppended(nsIContent* aFirstNewContent) {
  ContentChanged(aFirstNewContent->GetParent());
}
Example #19
0
void SVGStyleElement::CharacterDataChanged(nsIContent* aContent,
                                           const CharacterDataChangeInfo&) {
  ContentChanged(aContent);
}
void HTMLTextAreaElement::CharacterDataChanged(nsIContent* aContent,
                                               const CharacterDataChangeInfo&) {
  ContentChanged(aContent);
}
void HTMLTextAreaElement::ContentRemoved(nsIContent* aChild,
                                         nsIContent* aPreviousSibling) {
  ContentChanged(aChild);
}
Example #22
0
void SVGStyleElement::ContentInserted(nsIContent* aChild) {
  ContentChanged(aChild);
}
Example #23
0
void FlowTab::EmitContentChanged()
{
    m_safeToLoad = false;
    emit ContentChanged();
}