Mercurial > hg > octave-lyh
view examples/addtwomatrices.cc @ 16618:13728d41fb6a
use functions to handle colors in Windows GUI terminal
* QWinTerminalImpl.cpp (QConsolePrivate::backgroundColor,
QConsolePrivate::foregroundColor, QConsolePrivate::selectionColor,
QConsolePrivate::cursorColor, QConsolePrivate::setBackgroundColor,
QConsolePrivate::setForegroundColor,
QConsolePrivate::setSelectionColor, QConsolePrivate::setCursorColor):
New functions.
(QConsolePrivate::m_backgroundColor,
QConsolePrivate::m_foregroundColor): Delete member variables.
(QConsolePrivate::QConsolePrivate): Call setBackgroundColor and
setForegroundColor to set default colors.
(QWinTerminalImpl::viewPaintEvent): Use functions to access colors.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 May 2013 02:20:01 -0400 |
parents | 4295d634797d |
children | be41c30bcb44 |
line wrap: on
line source
#include <octave/oct.h> DEFUN_DLD (addtwomatrices, args, , "Add A to B") { int nargin = args.length (); if (nargin != 2) print_usage (); else { NDArray A = args(0).array_value (); NDArray B = args(1).array_value (); if (! error_state) return octave_value (A + B); } return octave_value_list (); }