Esempio n. 1
0
void MAS::Window::UpdateWindowProperties() {
   if (HasFocus()) {
      iconMax.Enable();
      iconMin.Enable();
      iconExit.Enable();
      title.Enable();
   }
   else {
      iconMax.Disable();
      iconMin.Disable();
      iconExit.Disable();
      title.Disable();
   }

   if (Flags() & D_RESIZABLE) {
      if (!Hidden()) {
         iconMax.Unhide();
         iconMin.Unhide();
      }
   }
   else {
      iconMax.Hide();
      iconMin.Hide();
   }
}
Esempio n. 2
0
char *flag_description( dbref player, dbref target ) {
    char *buff, *bp;

    FLAGENT *fp;

    int otype;

    FLAG fv;

    /*
     * Allocate the return buffer
     */

    otype = Typeof( target );
    bp = buff = alloc_mbuf( "flag_description" );

    /*
     * Store the header strings and object type
     */

    safe_mb_str( ( char * ) "Type: ", buff, &bp );
    safe_mb_str( ( char * ) object_types[otype].name, buff, &bp );
    safe_mb_str( ( char * ) " Flags:", buff, &bp );
    if( object_types[otype].perm != CA_PUBLIC ) {
        return buff;
    }
    /*
     * Store the type-invariant flags
     */

    for( fp = gen_flags; fp->flagname; fp++ ) {
        if( fp->flagflag & FLAG_WORD3 ) {
            fv = Flags3( target );
        } else if( fp->flagflag & FLAG_WORD2 ) {
            fv = Flags2( target );
        } else {
            fv = Flags( target );
        }
        if( fv & fp->flagvalue ) {
            if( ( fp->listperm & CA_WIZARD ) && !Wizard( player ) ) {
                continue;
            }
            if( ( fp->listperm & CA_GOD ) && !God( player ) ) {
                continue;
            }
            /*
             * don't show CONNECT on dark wizards to mortals
             */
            if( isPlayer( target ) && isConnFlag( fp ) &&
                    Can_Hide( target ) && Hidden( target ) &&
                    !See_Hidden( player ) ) {
                continue;
            }
            safe_mb_chr( ' ', buff, &bp );
            safe_mb_str( ( char * ) fp->flagname, buff, &bp );
        }
    }

    return buff;
}
Esempio n. 3
0
 void TeleportWidget::AnimationsFinished()
 {
     if (visibility_animation_->direction() == QAbstractAnimation::Backward)
     {
         hide();
         emit Hidden();
     }
 }
void RenderWidget::hideEvent( QHideEvent* /*event*/ )
{
    if (checkFlag(Window::eFlags_IsVisible))
    {
        clearFlag(Window::eFlags_IsVisible);
        Hidden();
    }
}
Esempio n. 5
0
		void MenuItemSelect(Gwen::Controls::Base* pControl)
	{
		if (Hidden())
		{
			SetHidden(false);
		} else
		{
			SetHidden(true);
		}
	}
Esempio n. 6
0
    void MenuItemSelect(Gwen::Controls::Base* pControl)
    {
		if (m_profWindow->Hidden())
		{
			m_profWindow->SetHidden(false);
		} else
		{
			m_profWindow->SetHidden(true);
		}
		
    }
Esempio n. 7
0
void FMainWindow::initConnect( )
{
    connect(titleBar, SIGNAL(minimuned()), this, SIGNAL(Hidden()));
    connect(titleBar, SIGNAL(closed()), this, SLOT(CloseWindow()));
    connect(titleBar, SIGNAL(minimuned()), this, SLOT(hide()));
 //   connect(titleBar, SIGNAL(minimuned()), this, SLOT(showFlyWidget()));
    connect(titleBar, SIGNAL(maximumed()), this, SLOT(swithMaxNormal()));
    //connect(titleBar, SIGNAL(closed()), this, SLOT(hide()));
  //  connect(titleBar, SIGNAL(closed()), this, SLOT(showFlyWidget()));
    connect(trayicon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this, SLOT(onSystemTrayIconClicked(QSystemTrayIcon::ActivationReason)));
}
Esempio n. 8
0
void Graphic::Erase (Canvas* c, Coord l, Coord b, Coord r, Coord t) {
    if (Hidden()) return;

    if (Parent() == nil) {
	eraseClipped(c, l, b, r, t, this);

    } else {
	FullGraphic gs;
	totalGS(gs);
	eraseClipped(c, l, b, r, t, &gs);
    }
}
Esempio n. 9
0
void Graphic::Erase (Canvas* c) {
    if (Hidden()) return;

    if (Parent() == nil) {
	erase(c, this);

    } else {
	FullGraphic gs;
	totalGS(gs);
	erase(c, &gs);
    }
}
Esempio n. 10
0
void Graphic::Draw (Canvas* c) {
    if (Hidden()) return;

    if (Parent() == nil) {
	draw(c, this);

    } else {
	FullGraphic gs;
	totalGS(gs);
	draw(c, &gs);
    }
}
Esempio n. 11
0
ARCEMU_INLINE bool SetFlagVisible(uint8 & flag, bool set)
{
	if(ForcedInvisible(flag) || Hidden(flag))
		return false;
	else if(set && !Visible(flag))
		flag |= FACTION_FLAG_VISIBLE;
	else if(!set && Visible(flag))
		flag &= ~FACTION_FLAG_VISIBLE;
	else
		return false;

	return true;
}
Esempio n. 12
0
int has_flag( dbref player, dbref it, char *flagname ) {
    FLAGENT *fp;

    FLAG fv;

    fp = find_flag( it, flagname );
    if( fp == NULL ) {	/* find_flag() uppercases the string */
        if( !strcmp( flagname, "PLAYER" ) ) {
            return isPlayer( it );
        }
        if( !strcmp( flagname, "THING" ) ) {
            return isThing( it );
        }
        if( !strcmp( flagname, "ROOM" ) ) {
            return isRoom( it );
        }
        if( !strcmp( flagname, "EXIT" ) ) {
            return isExit( it );
        }
        return 0;
    }
    if( fp->flagflag & FLAG_WORD3 ) {
        fv = Flags3( it );
    } else if( fp->flagflag & FLAG_WORD2 ) {
        fv = Flags2( it );
    } else {
        fv = Flags( it );
    }

    if( fv & fp->flagvalue ) {
        if( ( fp->listperm & CA_WIZARD ) && !Wizard( player ) ) {
            return 0;
        }
        if( ( fp->listperm & CA_GOD ) && !God( player ) ) {
            return 0;
        }
        /*
         * don't show CONNECT on dark wizards to mortals
         */
        if( isPlayer( it ) && isConnFlag( fp ) &&
                Can_Hide( it ) && Hidden( it ) && !See_Hidden( player ) ) {
            return 0;
        }
        return 1;
    }
    return 0;
}
Esempio n. 13
0
void Graphic::DrawClipped (Canvas* c, Coord l, Coord b, Coord r, Coord t) {
    if (Hidden()) return;

    _clipping = new BoxObj(l, b, r, t);
    _p->Clip(c, l, b, r, t);

    if (Parent() == nil) {
	drawClipped(c, l, b, r, t, this);
    } else {
	FullGraphic gs;
	totalGS(gs);
	drawClipped(c, l, b, r, t, &gs);
    }
    _p->NoClip();
    delete _clipping;
    _clipping = nil;
}
Esempio n. 14
0
//-----------------------------------------------------------------------------
//!
//-----------------------------------------------------------------------------
void tEditExpandSideBar::SetToNormal( bool animate )
{
    if ( ExpandedView() )
    {
        Collapse( animate );
    }
    if ( Hidden() )
    {
        if ( animate ) 
        {
            SlideIn();
        }
        else
        {
            MoveIn();
        }
        UpdateExpandCollapseItem();
    }
}
Esempio n. 15
0
bool has_flag(dbref player, dbref it, const UTF8 *flagname)
{
    FLAGNAMEENT *fp = find_flag(flagname);
    if (!fp)
    {
        return false;
    }
    FLAGBITENT *fbe = fp->fbe;

    if (  (  fp->bPositive
          && (db[it].fs.word[fbe->flagflag] & fbe->flagvalue))
       || (  !fp->bPositive
          && (db[it].fs.word[fbe->flagflag] & fbe->flagvalue) == 0))
    {
        if (  (  (fbe->listperm & CA_STAFF)
              && !Staff(player))
           || (  (fbe->listperm & CA_ADMIN)
              && !WizRoy(player))
           || (  (fbe->listperm & CA_WIZARD)
              && !Wizard(player))
           || (  (fbe->listperm & CA_GOD)
              && !God(player)))
        {
            return false;
        }

        // Don't show CONNECT on dark wizards to mortals
        //
        if (  isPlayer(it)
           && (fbe->flagvalue == CONNECTED)
           && (fbe->flagflag == FLAG_WORD2)
           && Hidden(it)
           && !See_Hidden(player))
        {
            return false;
        }
        return true;
    }
    return false;
}
// ---------------------------------------------------------
// RFavouritesSrvTable::ReadItemDataL
// ---------------------------------------------------------
//
void RFavouritesSrvTable::ReadItemDataL( CFavouritesItemImpl& aItem ) const
{
    // Fill standard attributes.
    aItem.SetUid( Uid() );
    // No bookmark can exist with the Null Uid.
    __ASSERT_DEBUG( aItem.Uid() != KFavouritesNullUid,
                    FavouritesPanic( EFavouritesNullUidInDatabase ) );
    aItem.SetParentFolder( ParentFolder() );
    aItem.SetType( Type() );
    aItem.SetNameL( Name() );
    HBufC* url = UrlLC();
    aItem.SetUrlL( *url );
    CleanupStack::PopAndDestroy();  // url
    aItem.SetUserNameL( Username() );
    aItem.SetPasswordL( Password() );
    aItem.SetWapAp( WapAp() );
    aItem.SetFactoryItem( FactoryItem() );
    aItem.SetReadOnly( ReadOnly() );
    aItem.SetContextId( ContextId() );
    aItem.SetModified( Modified() );
    aItem.SetHidden( Hidden() );
}
Esempio n. 17
0
UTF8 *flag_description(dbref player, dbref target)
{
    // Allocate the return buffer.
    //
    int otype = Typeof(target);
    UTF8 *buff = alloc_mbuf("flag_description");
    UTF8 *bp = buff;

    // Store the header strings and object type.
    //
    safe_mb_str(T("Type: "), buff, &bp);
    safe_mb_str(object_types[otype].name, buff, &bp);
    safe_mb_str(T(" Flags:"), buff, &bp);
    if (object_types[otype].perm != CA_PUBLIC)
    {
        *bp = '\0';
        return buff;
    }

    // Store the type-invariant flags.
    //
    FLAGNAMEENT *fp;
    for (fp = gen_flag_names; fp->flagname; fp++)
    {
        if (!fp->bPositive)
        {
            continue;
        }
        FLAGBITENT *fbe = fp->fbe;
        if (db[target].fs.word[fbe->flagflag] & fbe->flagvalue)
        {
            if (  (  (fbe->listperm & CA_STAFF)
                  && !Staff(player))
               || (  (fbe->listperm & CA_ADMIN)
                  && !WizRoy(player))
               || (  (fbe->listperm & CA_WIZARD)
                  && !Wizard(player))
               || (  (fbe->listperm & CA_GOD)
                  && !God(player)))
            {
                continue;
            }

            // Don't show CONNECT on dark wizards to mortals.
            //
            if (  isPlayer(target)
               && (fbe->flagvalue == CONNECTED)
               && (fbe->flagflag == FLAG_WORD2)
               && Hidden(target)
               && !See_Hidden(player))
            {
                continue;
            }
            safe_mb_chr(' ', buff, &bp);
            safe_mb_str(fp->flagname, buff, &bp);
        }
    }

    // Terminate the string, and return the buffer to the caller.
    //
    *bp = '\0';
    return buff;
}
Esempio n. 18
0
 static Hidden Get() { return Hidden(); }
Esempio n. 19
0
GridCtrl::ItemRect& GridCtrl::ItemRect::AlwaysHidden(bool b)
{
	alwayshidden = b; // Flag to xmlize to not try and expand or hide.
	return Hidden(b);
}
void VirtualWifiNotifyIcon::notify_hidden()
{
	Hidden();
}
Esempio n. 21
0
char *unparse_flags( dbref player, dbref thing ) {
    char *buf, *bp, *s;

    FLAGENT *fp;

    int flagtype;

    FLAG fv, flagword, flag2word, flag3word;

    buf = bp = s = alloc_sbuf( "unparse_flags" );
    *bp = '\0';

    if( !Good_obj( player ) || !Good_obj( thing ) ) {
        strcpy( buf, "#-2 ERROR" );
        return buf;
    }
    flagword = Flags( thing );
    flag2word = Flags2( thing );
    flag3word = Flags3( thing );
    flagtype = ( flagword & TYPE_MASK );
    if( object_types[flagtype].lett != ' ' ) {
        safe_sb_chr( object_types[flagtype].lett, buf, &bp );
    }

    for( fp = gen_flags; fp->flagname; fp++ ) {
        if( fp->flagflag & FLAG_WORD3 ) {
            fv = flag3word;
        } else if( fp->flagflag & FLAG_WORD2 ) {
            fv = flag2word;
        } else {
            fv = flagword;
        }
        if( fv & fp->flagvalue ) {

            if( ( fp->listperm & CA_WIZARD ) && !Wizard( player ) ) {
                continue;
            }
            if( ( fp->listperm & CA_GOD ) && !God( player ) ) {
                continue;
            }

            /*
             * don't show CONNECT on dark wizards to mortals
             */

            if( ( flagtype == TYPE_PLAYER ) && isConnFlag( fp ) &&
                    Can_Hide( thing ) && Hidden( thing ) &&
                    !See_Hidden( player ) ) {
                continue;
            }

            /*
             * Check if this is a marker flag and we're at the
             * beginning of a buffer. If so, we need to insert a
             * separator character first so we don't end up
             * running the dbref number into the flags.
             */
            if( ( s == bp ) && isMarkerFlag( fp ) ) {
                safe_sb_chr( MARK_FLAG_SEP, buf, &bp );
            }

            safe_sb_chr( fp->flaglett, buf, &bp );
        }
    }

    *bp = '\0';
    return buf;
}