×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    4

    Series 80 window class

    In series 80 native applications make use of split view user interface to have more than one window on the screen that the user can switch between.

    This is described as the window view in section 8.4 in the series 80 UI style guide v1. The window layout usually has two windows—the left contains a list and the right contains "details" or a content window. Window frames can also be used to separate certain views from each other. The best examples are the calendar and contacts applications

    Symbian has written an extension to allow java applications to achieve the look and feel of the split view:
    (http://www.symbian.com/developer/tec.../cawt/cawt.pdf)

    I have been searching for the right class to implement the window layut in C++ but failed to find the right classes.
    So what are the classes used for implementing window frames in C++?!!

    Thanks in advance!

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    4
    Thanx a lot!
    I think, this will do the trick.
    But do you suggest then that there is no standard classes to do this windowing?!

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    I think the example is already using standard classes on it ?

    yucca

  5. #5
    Registered User
    Join Date
    Oct 2004
    Posts
    4
    Of course it uses standard classes, but the drawing of borders is hard coded. I compared the windows drawn to the ones done in the calendar and contacts application. The windows there have gradient shadow when highlighted, unlike the one that is drawn in the application which is one color. I don't know if this shadowing is affected by skins or not. That is what I meant by standard implementation to the window.

  6. #6
    Nokia Developer Expert
    Join Date
    Apr 2003
    Location
    Finland
    Posts
    425
    Hello,

    If you are working with Nokia 9500 (S7.0) you can use CCknBorderedControl instead of CCoeControl.

    After this change try following on your CCknBorderedControl derived classes:

    ::ConstructL ()
    {
    // Add border
    CCknSkinBase& skin = CknEnv::Skin();
    skin.SetWinShape(ERegionTypePopout, Window());

    // or try this
    //SetBorder (EPopoutWindow);

    // Add shadow
    iEikonEnv->AddWindowShadow(static_cast<CCoeControl*>(this)); // pointer to bordered coecontrol.

    In some cases controls should react to the HandleSkinReloadEventL event, this happen if user change e.g. colors of device...but this seems to be off topic issue.

    Br V.

  7. #7
    Registered User
    Join Date
    Oct 2004
    Posts
    4
    Hi,

    I have been finally able to solve the problem in a standard way, with exactly the L&F of native communicator applications. I defined a very thin class called CCknWindowFrame that implements the window functionality. Any view wishing to use window view should inherit from it.

    Only one issue with this solution:

    The method CknEnv::SetDropShadowToLogicalBorder () used in this class is declared in the Series 80 DP2 SDK to be deprecated. However the class work excellently. There is no reference to what should be used instead. It would be excellent if anyone knows what the new method to be used would be!!!

    Thanks for your help :)

    Br,
    Sameh

    Here is the class code
    __________________________________________________
    #ifndef __CKNWINDOWFRAME_H
    #define __CKNWINDOWFRAME_H

    // CEikBorderedControl
    #include <eikbctrl.h>

    //
    // CCknWindowFrame
    //
    // The window view control
    //

    class CCknWindowFrame : public CEikBorderedControl
    {
    public:
    CCknWindowFrame();

    protected: // from CCoeControl
    void Draw(const TRect& aRect) const;
    };

    #endif //__CKNWINDOWFRAME_H

    _________________________________________________
    #include "CknWindowFrame.h"
    #include <cknenv.h>
    #include <eikenv.h>

    CCknWindowFrame::CCknWindowFrame()
    {
    // Set shadow border
    CknEnv::SetDropShadowToLogicalBorder(ETrue,TGulBorder::EWindow,
    iEikonEnv->ControlColor(EColorWindowBackground,*this));
    SetBorder(TGulBorder::EWindow);
    }


    void CCknWindowFrame::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.Clear(aRect);
    if (IsFocused())
    CEikBorderedControl::Draw(aRect);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×