// returns the addition of this color with another color Color Color::operator+ (const Color& vRhs) const { double trans=Transparent() > vRhs.Transparent() ? Transparent() : vRhs.Transparent(); return Color(Red()+vRhs.Red(),Green()+vRhs.Green(),Blue()+vRhs.Blue(), trans); }
bool World::NegativeVisible(float x_from, float y_from, float z_from, short x_to, short y_to, const short z_to) const { // this function is like World::PositiveVisible, // except those 4 lines: x_from=-x_from; y_from=-y_from; x_to=-x_to; y_to=-y_to; const ushort max=qMax(qAbs(x_to-(short)x_from), qMax(qAbs(z_to-(short)z_from), qAbs(y_to-(short)y_from))); const float x_step=(x_to-x_from)/max; const float y_step=(y_to-y_from)/max; const float z_step=(z_to-z_from)/max; for (ushort i=1; i<max; ++i) { if ( BLOCK_OPAQUE==Transparent( -qRound(x_from+=x_step), -qRound(y_from+=y_step), qRound(z_from+=z_step)) ) { return false; } } return true; }
StaticText::StaticText() { NoWantFocus(); IgnoreMouse(); Transparent(); SetAlign(ALIGN_LEFT); }
ColorButton::ColorButton() { style = &ToolBar::StyleDefault().buttonstyle; SetFrame(NullFrame()); NoTrack(); Transparent(); }
RichTextView& RichTextView::Background(Color c) { background = c; Transparent(IsNull(c)); Refresh(); return *this; }
Picture& Picture::Background(Color color) { background = color; Transparent(IsNull(color)); Refresh(); return *this; }
SizeGrip::SizeGrip() { Transparent(); RightPos(0, 12).BottomPos(0, 12); NoWantFocus(); Width(14); }
MultiButton& MultiButton::NoBackground(bool b) { SetFrame(EditFieldFrame()); nobg = b; Transparent(); Refresh(); return *this; }
Color::Color(double vRed, double vGreen, double vBlue, double vTransparent) { Red(vRed); Green(vGreen); Blue(vBlue); Transparent(vTransparent); }
RichTextCtrl::RichTextCtrl() { SetZoom(Zoom(1, 1)); Transparent(); Background(Null); SetFrame(NullFrame()); AutoHideSb(); }
SeparatorCtrl::SeparatorCtrl() { NoWantFocus(); Transparent(); Disable(); lmargin = rmargin = 2; size = 7; SetStyle(StyleDefault()); }
ProgressIndicator::ProgressIndicator() { style = &StyleDefault(); Transparent(); NoWantFocus(); total = actual = 0; percent = false; color = Null; pxp = 0; }
PopUpInfo::PopUpInfo(): color(SColorInfo()) { Transparent(false); NoWantFocus(); IgnoreMouse(); SetAlign(ALIGN_CENTER); SetFrame(BlackFrame()); opened = false; }
ToolButton::ToolButton() { Reset(); checked = false; paint_checked = false; nodarkadjust = false; Transparent(); kind = NOLABEL; }
MultiButton::MultiButton() { Transparent(); SetStyle(StyleDefault()); display = &StdDisplay(); convert = &NoConvert(); valuecy = Null; push = false; SetFrame(sNullFrame()); }
CHTMLHorizontalRuleSection::CHTMLHorizontalRuleSection( CParentSection *psect, bool bNoShade, COLORREF crColor ) : CHTMLSectionABC( psect ) , m_bNoShade( bNoShade ) , m_crColor( crColor ) { if( !bNoShade ) { Transparent( true ); } }
bool World::Visible( const ushort x_from, const ushort y_from, const ushort z_from, const ushort x_to, const ushort y_to, const ushort z_to) const { short temp; return ( (DirectlyVisible(x_from, y_from, z_from, x_to, y_to, z_to)) || (Transparent(x_to+(temp=(x_to>x_from) ? (-1) : 1), y_to, z_to) && DirectlyVisible( x_from, y_from, z_from, x_to+temp, y_to, z_to)) || (Transparent(x_to, y_to+(temp=(y_to>y_from) ? (-1) : 1), z_to) && DirectlyVisible( x_from, y_from, z_from, x_to, y_to+temp, z_to)) || (Transparent(x_to, y_to, z_to+(temp=(z_to>z_from) ? (-1) : 1)) && DirectlyVisible( x_from, y_from, z_from, x_to, y_to, z_to+temp)) ); }
//============================================================================================== LogWin::LogWin() { // One exit button CtrlLayoutExit(*this, "Log"); Sizeable().Zoomable(); Icon(MyImages::logwin16()); TopMost(); // Force stayontop setting Transparent(); //logText.Transparent(); CenterScreen(); activated = false; UrpEdit &re = logText; re.ShowCodes(Null); // Hide space/newline icon indicators http://www.ultimatepp.org/forum/index.php?t=msg&goto=2453& re.SetQTF("[%00-00 "); // Disable spell checker. http://www.ultimatepp.org/forum/index.php?t=msg&goto=2453& }
void ReadR6Ti( CStream *s, vector<CLASS> *cache, const OBJECT *object ) { dword offset = object->offset + s->getreadbyte() / 2; s->readdword(); s->readword(); s->readword(); s->readdword(); int width = s->readword(); int height = s->readword(); dword flag = s->readdword(); dword depth = s->readdword(); s->readbyte(); s->readword(); ReadClassList( s, cache, object ); dword size=s->readdword(); // data size s->readdword(); s->readdword(); //Ö±½Ó¶ÁÈ¡block s->seek((size+1)/2*2+2); return; CImageWriter image( width, height ); switch ( flag & 0xff ) { case 2: if ( depth & 0x4 ) Opaque1( s, &image, width, height, depth ); else Opaque2( s, &image, width, height, depth ); break; case 3: Transparent( s, &image, width, height, depth ); break; default: throw "ReadR6Ti"; } image.write( offset ); }
bool World::PositiveVisible(float x_from, float y_from, float z_from, const ushort x_to, const ushort y_to, const ushort z_to) const { const ushort max=qMax(qAbs(x_to-(short)x_from), qMax(qAbs(z_to-(short)z_from), qAbs(y_to-(short)y_from))); const float x_step=(x_to-x_from)/max; const float y_step=(y_to-y_from)/max; const float z_step=(z_to-z_from)/max; for (ushort i=1; i<max; ++i) { if ( BLOCK_OPAQUE==Transparent( qRound(x_from+=x_step), qRound(y_from+=y_step), qRound(z_from+=z_step)) ) { return false; } } return true; }
NAMESPACE_UPP #define LLOG(x) // DLOG(x) #define LTIMING(x) // RTIMING(x) MenuItemBase::MenuItemBase() { accel = 0; state = 0; isenabled = true; type = 0; font = StdFont(); leftgap = Zx(16); textgap = Zy(6); accesskey = 0; NoWantFocus(); style = &MenuBar::StyleDefault(); Transparent(); maxiconsize = Size(INT_MAX, INT_MAX); }
RightTabs::RightTabs() { cx = 3; cursor = -1; Transparent(); }
ParentCtrl::ParentCtrl() { NoWantFocus(); Transparent(); minsize = Null; }