Widget開発(クリスマス・イブ)

iG:Syntax Hiliter 日本語版の導入・試験も兼ねて。。

前にも書いたとおり、ACCESSが提供しているNetFrontBrowser Widget開発用のJavaScriptライブラリでは、
Widgetを、dock状態、float状態、maximize状態へ遷移させるボタンと、押下時のイベントは
ひとまとまりにdivタグでくくられて出力されている。(ちなみに、「押下」って「おうか」と初見で読めます??)

./access/nfbwdgt.js

[js]
function nfbw_displayModeButton(arg)
{

(中略)

////////////////////////////////
// main
//
eButtons = document.createElement(‘DIV’);
if (arg.idName) {
eButtons.setAttribute(‘id’, arg.idName);
}

eDock = nfbw_createButtonS({‘onclickfunc’:’widget.dock();’,
‘imgName’:arg.buttons.dockImgName,
‘imgWidth’:width,
‘imgHeight’:height,
‘isElement’:true});
eDock.style.position = ‘absolute’;
eDock.style.top = ‘0px’;
eDock.style.left = ‘0px’;

eMini = nfbw_createButtonS({‘onclickfunc’:’widget.restore();’,
‘imgName’:arg.buttons.floatImgName,
‘imgWidth’:width,
‘imgHeight’:height,
‘isElement’:true});
eMini.style.position = ‘absolute’;
eMini.style.top = ‘0px’;
eMini.style.left = width/3 + gaplen + ‘px’;
eMini.style.display = ‘none’;

eMaxi = nfbw_createButtonS({‘onclickfunc’:’widget.maximize();’,
‘imgName’:arg.buttons.maxImgName,
‘imgWidth’:width,
‘imgHeight’:height,
‘isElement’:true});
eMaxi.style.position = ‘absolute’;
eMaxi.style.top = ‘0px’;
eMaxi.style.left = width/3 + gaplen + ‘px’;
[/js]

と、各状態へ遷移させる関数

widget.maximize();
widget.restore();
widget.dock();

onclickイベントに割り当てている。
これだと個別にボタンを作成できないので、
ライブラリに入る手前の段階(つまり、function nfbw_displayModeButton(arg)の呼び出し元)で、
nfbw_createButtonS()によるボタンの作成を行わなければならない。
が、その問題として・・・(続く)

4 thoughts on “Widget開発(クリスマス・イブ)”

  1. 押下 → おうか
    日常の業務で使いまくりまくりすてぃです。
    情報系じゃない人はどうなんだろ??

  2. 押下ってアプリケーション開発の為に作られた造語じゃなかったっけ?正しい日本語だっけ??「押しっぱなし」とかは表記上好ましくないものね笑

    press←→release
    押下   解放

    英語の表記だと頭にスッと入ってくるんだけど,日本語だったらなーんか違和感感じる…。俺だけか…??

  3. >たか
    情報系の仕事じゃないと、絶対使わないと思うんだよねぇ。

    >しろたそ
    まじでー俺は読めなかった。。っていうか今でも納得いかない読み方だわ。

    >tomoさん
    そうっすよね!たぶん造語ですよね。
    押下はマジで違和感ありまくりです。。

Leave a Reply to Naoharu Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.